Jump to content

Slothbots keep attacking themselves.


Recommended Posts

I"m trying to get the slothbots to hunt anyone who is not on their team, but they also attack each other. Here is the script I'm using to create the team and spawn the bots:

  
function createSlothTeam() 
    createTeam("SlothBots") 
end 
function commandSpawn() 
    call(getResourceFromName("slothbot"), "spawnBot", 2397, 1954, 6, 0, 183, 0, 0, SlothBots, 30, "hunting") 
end 
addCommandHandler("spawnbot", commandSpawn) 
addEventHandler("onResourceStart", getRootElement(), createSlothTeam) 
  

What am I doing wrong?

Link to comment
function createSlothTeam() 
    createTeam("SlothBots") 
end 
function commandSpawn() 
    call(getResourceFromName("slothbot"), "spawnBot", 2397, 1954, 6, 0, 183, 0, 0, "SlothBots", 30, "hunting") 
end 
addCommandHandler("spawnbot", commandSpawn) 
addEventHandler("onResourceStart", getRootElement(), createSlothTeam) 

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...