12p Posted July 23, 2010 Posted July 23, 2010 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.
50p Posted July 23, 2010 Posted July 23, 2010 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.
12p Posted July 23, 2010 Author Posted July 23, 2010 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.
50p Posted July 23, 2010 Posted July 23, 2010 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).
Slothman Posted July 24, 2010 Posted July 24, 2010 huh, whats going on in here? /me goes back to sleep
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now