Jump to content

slothbot mode - problem : its hunting, should be guarding


KonTest

Recommended Posts

Posted

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 ?

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

Posted

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.

Posted

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! :)

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