OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Peter_Bullet on 21 Mar 2005, 19:55:47
-
Really n00b topic name.
How can I force an AI soldier to put his gun on his back? I'm having a problem with the setBehaviour command. When I set it to "CARELESS", the quy stays in combat. I've also tried the playMove command... does anyone have a solution? If not I just have to remove all his weapons..... :P
-
Hmmm....
this setbehaviour "SAFE" sould work ;)
-
ARE YOU USING WAYPOINTS OR (SCRIPTS, MARKERS, OBJECTS) TO MOVE YOUR UNITS AROUND?
THE EASY WAY IS TO USE WAYPOINTS, like "careless" or "safe" ;D
-
alternatively, use the loon_name setbehaviour "safe" command in conjunction with loon_name switchmove "EffectStand". if that doesn't put the weapon on the loon's back, i'll eat my flashpoint ;)
-
id be gladly willing to eat your flashpoint if setbehaviour "careless" didnt work on its own
-
Quys quys I'm talking of ADVANCED scripting here (I don't mean to enlarge my ego ;) ) I definitely don't use waypoints when it's about making cutscenes. The setBehaviour command SAFE and CARELESS for some reason don't always work... (I've set it to "AWARE" before that")
I've done that playMove before... the loon immediately puts his gun back to his hand!
Thanks anyway... the idea is that the loon doesn't hold a gun when he is talking to a dude... I quess I have to use "removeAllWeapons" -command!
-
For the switchmoves and playmoves don't you have to use loops to keep the animation playing. Hope this might have helped.
GI-YO
-
as far as i know, loons will only disobey these kinds of commands for a reason, in other words, something startles them, there's an enemy around which they've spotted, they belong to a group commander who is behaving in an "aware" manner... but if the loons are on their own, with no enemies around, and with no reason to get jumpy, setbehaviour "safe" will always put the gun on the back. if it doesn't stay on the back, there's something making the loon react.
my only suggestion is that your putting them on "aware" first is somehow making them edgy. do the loons belong to a group in which other loons are still on aware?
it does sound like a very strange problem.... :-\
-
The loon is completely alone. First I set him "Combat" few seconds later "Aware" and 10 seconds later "SAFE" or "CARELESS". I too think that there's something with the aware thing. I've had this problem in one other mission too. There aren't any enemies.
Here's my way to circle it:
_unit = _this select 0
_effect = _this select 1
#Loop
_unit switchMove _effect
?!Animate: exit
~0.02
goto "Loop"
Unfortunately the quy can't walk, but you can't have everything, right?
-
if this is for a cutscene, why not simply set him to "safe" in the loon's init line? why the combat, aware then safe?
-
Because it's for my campaign.... Quy runs to the hill.... "somebody's coming"... puts his gun in his hand... a soldier comes the quy shouts "FREEZE" ....it appears they are on the same side.... "AWARE" (not aiming, gun low) ....the quy goes to talk to the leader of the soldier "SAFE".... after that the cutscene ends, so I can use that script....
(I hope you understand the above ;))
-
so after the guy comes up to the top of the hill then he puts his gun in his hand then after the other guy comes up they are friends then he puts his gun on his back?
in the waypoint for him to run up the hill put in the onactivation field
guy setbehaviour "aware". then after he knows the other guy is friendly like in the waypoint of the other guy that comes up the hill put in his waypoint onactivation field. guy setbehaviour "safe". then he will put his gun on his back. i think you made it harder then it sounds. btw when are you going to release the campaign?
good luck :)
-
Well, I prefer doing everything in scripts, so I don't use waypoints but the DoMove command... and exept the camera work the cutscene is almost done, so I don't want to change that....
The campaign... first mission is in the missions depot (Forced To War 1.2) but making the whole campaign takes time (many months) but my goal is to finish it someday... (second mission done :), third on the way) lots of cutscenes between.....(undone...)