Hi,
I got a little problem with the Mode of the slothbots.
They should spawn at Area69 at different locations in different modes.
Some of them on top of the towers, a few on the ground.
They spawn, but in allways in 'hunting' mode.
Here here it is :
function onResourceStart(thisResource)
local team = getTeamFromName("ArmyBots")
local mode= "guarding"
local mode2= "waiting"
call (getResourceFromName("slothbot"), "spawnBot", 113.49, 1813.77, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 103.03, 1901.06, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 162.12, 1933.27, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 233.42, 1935.47, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 267.54, 1895.61, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 262.23, 1807.23, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 166.12, 1849.59, 33.90, 0, 287, 0, 0, team, 34, mode)
call (getResourceFromName("slothbot"), "spawnBot", 95.49, 1924.03, 18.11, 0, 287, 0, 0, team, 30, mode)
call (getResourceFromName("slothbot"), "spawnBot", 95.48, 1917.50, 18.11, 0, 287, 0, 0, team, 30, mode2)
call (getResourceFromName("slothbot"), "spawnBot", 223.71, 1872.26, 13.73, 0, 287, 0, 0, team, 30, mode2)
call (getResourceFromName("slothbot"), "spawnBot", 265.52, 1844.60, 17.65, 0, 287, 0, 0, team, 30, mode2)
call (getResourceFromName("slothbot"), "spawnBot", 265.52, 18848.60, 17.65, 0, 287, 0, 0, team, 30, mode2)
call (getResourceFromName("slothbot"), "spawnBot", 119.97, 1836.54, 17.65, 0, 287, 0, 0, team, 30, mode2)
call (getResourceFromName("slothbot"), "spawnBot", 122.97, 1836.54, 17.65, 0, 287, 0, 0, team, 30, mode2)
end
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart )
I tried
call (getblablubbb ...... , team, 30, "waiting")
but it doesnt work either.
Can anyone help me, pls ?