Jump to content

Another slothbot trouble D: (Slothman required here)


12p

Recommended Posts

addEventHandler ("onResourceStart",getRootElement(),
function ()
nemesis = exports.slothbot:spawnBot(-1918.25,660.35,46.56,90,103,0,0,nemesis,38,"hunting")
exports.slothbot:setBotAttackEnabled (nemesis,true)
end)

It spawns 3 bots... I just want 1. Slothman, please come here and try to solve it.

Link to comment

Are you sure nemesis (one of spawnBot function arguments) is a team element? Well, it doesn't matter that much but is the bot created? Don't you get any error/warning message? "/debugscript 3" remember this command.

Link to comment

nemesis: Not important, I tried with "nil" team, the same thing happens. Yes, but I want to create 1 bot, and it creates 3... No, I don't receive any warning or errors. I use "debugscript 3" all the time.

Link to comment

It creates 3 bots because you start 3 resources. addEventHandler to getResourceRootElement not getRootElement otherwise the function will be called every time you start a resource (any resource).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...