Home   Help Search Login Register  

Author Topic: How do I make a soldier put his gun on the back?  (Read 647 times)

0 Members and 1 Guest are viewing this topic.

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
How do I make a soldier put his gun on the back?
« 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

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:How do I make a soldier put his gun on the back?
« Reply #1 on: 21 Mar 2005, 19:58:06 »
Hmmm....

Code: [Select]
this setbehaviour "SAFE" sould work  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

makkaramies

  • Guest
Re:How do I make a soldier put his gun on the back?
« Reply #2 on: 21 Mar 2005, 20:07:44 »
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

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:How do I make a soldier put his gun on the back?
« Reply #3 on: 21 Mar 2005, 21:08:34 »
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 ;)

StonedSoldier

  • Guest
Re:How do I make a soldier put his gun on the back?
« Reply #4 on: 22 Mar 2005, 00:29:28 »
id be gladly willing to eat your flashpoint if setbehaviour "careless" didnt work on its own

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:How do I make a soldier put his gun on the back?
« Reply #5 on: 22 Mar 2005, 14:10:29 »
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!

GI-YO

  • Guest
Re:How do I make a soldier put his gun on the back?
« Reply #6 on: 22 Mar 2005, 14:22:51 »
For the switchmoves and playmoves don't you have to use loops to keep the animation playing. Hope this might have helped.

GI-YO

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:How do I make a soldier put his gun on the back?
« Reply #7 on: 22 Mar 2005, 15:41:43 »
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....  :-\

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:How do I make a soldier put his gun on the back?
« Reply #8 on: 22 Mar 2005, 15:51:24 »
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?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:How do I make a soldier put his gun on the back?
« Reply #9 on: 22 Mar 2005, 15:55:53 »
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?

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:How do I make a soldier put his gun on the back?
« Reply #10 on: 22 Mar 2005, 16:20:44 »
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 ;))

marcus3

  • Guest
Re:How do I make a soldier put his gun on the back?
« Reply #11 on: 22 Mar 2005, 18:39:02 »
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 :)

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:How do I make a soldier put his gun on the back?
« Reply #12 on: 24 Mar 2005, 18:29:10 »
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...)