Home   Help Search Login Register  

Author Topic: SetBehaviour on singel Unit  (Read 926 times)

0 Members and 1 Guest are viewing this topic.

Fatherbob

  • Guest
SetBehaviour on singel Unit
« on: 20 Oct 2002, 16:01:12 »
Hi.
We are using a script where a civilian unit randomly chooses a gamelogicpoit to move to.
The idear is to have 20 or so civilians to randomly choose between 7 or more gamelogic point in a city , thus creating a city inviroment.
Each unit exec the script in the player init line.
The only problem is that they are running from point to point , making the city inviroment unrealistic.
SetBehaviour and SetSpeedMode do not work. We have tried them in the scrpit as well as in the Unit init line.
We also tried to make a start waypoint to force them to walk, but as soon as they exec the script - they run........hmm  :hmm:

Any Idears on how to make the civilians walk, instead off run ?


Trex2001

  • Guest
Re:SetBehaviour on singel Unit
« Reply #1 on: 21 Feb 2003, 16:21:03 »
Maybe you should show part of the script or your init file. I guess you initialized them wrong...

teeBore

  • Guest
Re:SetBehaviour on singel Unit
« Reply #2 on: 23 Feb 2003, 06:39:23 »
Yeah I think that might be yer problem, show us the init for these civs cos I just tested out what you were saying and it worked perfectly.

always:
civ setBehaviour "SAFE"
for walk:
civ setSpeedMode "Limited"
for run:
civ setSpeedMode "Normal"

I didn't use any waypoints, only doMove commands.

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:SetBehaviour on singel Unit
« Reply #3 on: 23 Feb 2003, 22:06:13 »
I would recommend using the "move" command instead of "commandmove" or "domove".

Sometimes (especially with aircraft), the speedmode aned behaviour settings are ignored by a unit if you're not using waypoints. The "move" command actually creates a waypoint, so when you use that to make a unit move, it will allways pay attention to it's speedmode and behavioir settings.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.