KonTest Posted December 30, 2010 Share Posted December 30, 2010 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 ? Link to comment
NotAvailable Posted December 31, 2010 Share Posted December 31, 2010 You should be on the ArmyBots team, Otherwise they attack you. Link to comment
KonTest Posted December 31, 2010 Author Share Posted December 31, 2010 Yes they do Is there a way to tell the first 7 Bots to stay on top of their towers.... when they attack somebody ? Link to comment
NotAvailable Posted December 31, 2010 Share Posted December 31, 2010 Yes they do Is there a way to tell the first 7 Bots to stay on top of their towers.... when they attack somebody ? Put it on 'Guarding', They will not follow when a player runs away, They will only shoot. Link to comment
KonTest Posted December 31, 2010 Author Share Posted December 31, 2010 Very funny Thats what I tried. If you take a look at line 3 and 4 of the code, you'll see what I mean. My guess: the values for mode and mode2 are not accepted, so the standart-value 'hunting is passed. The question is : why ? and how can I change that. Link to comment
Dark Dragon Posted December 31, 2010 Share Posted December 31, 2010 try to call setBotGuard bool setBotGuard( element theBot, float x, float y, float z, [ bool priority = false ] ) Link to comment
KonTest Posted January 1, 2011 Author Share Posted January 1, 2011 Thanks, I'll try that. Maybe a stupid question .. but : How can I differentiate between one bot (or Ped) and another? Or what should be the Value for 'theBot' ? Do they have Numbers ? btw : Happy New Year! Link to comment
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