Home   Help Search Login Register  

Author Topic: Problem with 'setbehaviour' and captives...  (Read 1093 times)

0 Members and 2 Guests are viewing this topic.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Problem with 'setbehaviour' and captives...
« on: 27 May 2004, 22:04:05 »
Evenin' all...

 I'm working on an outro cutscene at the moment where the East troops have surrendered. I want some of the West troops to be actively guarding the prisoners and other West troops to be more relaxed (in 'safe' mode). The problem is that all the West soldiers go into combat positions as soon as they see the prisoners! Even if I setbeahviour 'SAFE' in the init box, or give the unit a waypoint with safe behaviour, it's still guns at the ready.   ???
 I need to have two characters having a conversation near the prisoners, but at the moment all they do is point their guns at each other...

 Also, any playmove/switchmove commands I give to the Eastern prisoners are ignored, resulting in the prisoners lying prone on the ground rather than sitting down or in 'hands up' mode!

 Anyone know any ways of getting around this...?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Problem with 'setbehaviour' and captives...
« Reply #1 on: 27 May 2004, 22:09:09 »
Give all the relaxed grunts on west side a behaviour of "careless"...

Same for the prisoners...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #2 on: 27 May 2004, 22:41:01 »
I tried that... didn't make a blind bit of difference. As soon as they are aware of the captives (which is immediately) the un-shoulder their guns!

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Problem with 'setbehaviour' and captives...
« Reply #3 on: 27 May 2004, 22:42:59 »
  :-* ;) yea, or just one big fat ugly stinkin' trigger that covers 'em all :

 "_x setcaptive true" foreach thisList; {_x setbehaviour "Careless"} foreach thislist :thumbsup:  ;D


 :cheers:




Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Problem with 'setbehaviour' and captives...
« Reply #4 on: 27 May 2004, 23:00:30 »
Quote
I tried that... didn't make a blind bit of difference. As soon as they are aware of the captives (which is immediately) the un-shoulder their guns!

Are you really sure you did it right, as behaviour "CARELESS"
makes them for sure keep their rifles on them backs.

I remember having made big massacres without getting
any kind of attendance when guys were in careless mode  ;D

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Problem with 'setbehaviour' and captives...
« Reply #5 on: 27 May 2004, 23:04:49 »
( *shakes head* )  chris, you murderer!  >:( ::) ;D

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #6 on: 27 May 2004, 23:18:09 »
Right... just for an experiment...

 I've placed a trigger covering the whole map

  Activated by:
Anybody
Once
On activation: "_x setbehaviour ""CARELESS""" forEach thislist

 As far as I'm aware this will make every unit within the trigger go to 'careless' mode.

 The thing is... all my west units are still pointing their guns at the prisoners!!!  :-[

 Does it make a difference that I'm using the Seb Nam Pack 2 units?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problem with 'setbehaviour' and captives...
« Reply #7 on: 28 May 2004, 00:50:41 »
I would be astonished if this

"_x setbehaviour ""CARELESS""" forEach thislist

worked.   Try this

"_x setbehaviour {CARELESS}" forEach thislist

You can't use quotes within quotes - the game thinks the opening of the second quote is the closing of the first quote, and so it gets confused because the syntax is screwed up.   Use curly brackets { } to avoid this.
Plenty of reviewed ArmA missions for you to play

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #8 on: 28 May 2004, 09:24:52 »
Aaaah... that'll be it then    ::)

 The double quote thing was something I picked up from another thread on these forums. It seems to work if written in a script, I didn't realise it didn't work in the mission editor...

 Thanks Maguba.

 :)
« Last Edit: 28 May 2004, 09:25:46 by Clue »

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #9 on: 28 May 2004, 09:37:17 »
Still doesn't work...    ???

 I've even tried setting the trigger to 'repeatedly' but it has no effect. At the moment, everyone remains in safe mode for about a second... and then the guns come off the shoulders again! Even the ones that are facing away from the captives 'go combat'.

 Just how important is an outro cutscene anyway...?   :-\

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problem with 'setbehaviour' and captives...
« Reply #10 on: 28 May 2004, 10:06:03 »
OK, well lets go back to basics.    Create a test mission somewhere, add just one loon and see if you can get him into careless.   Then add others and test that line of code.     And so on, building up to your real mission.    Hopefully that will illuminate the problem.
Plenty of reviewed ArmA missions for you to play

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #11 on: 28 May 2004, 19:38:02 »
Right... now I'm really confused!

I set up some units on the empty desert island.

Me - civilian observer
West - init: this setbehaviour "CARELESS"
East - init: removeallweapons this

A trigger covering all the units
Activated by - East/Once
On activation - "_x setcaptive true" foreach thisList; {_x setbehaviour "Careless"} foreach thislist


 And it works fine! ???

 The West troop calmly stands right next to the East prisoner with his gun still on his back.

Looking at my outro cutscene again, it seems as though all the units are taking their behaviour and formation from the init.sqs file. Also, when I hit the preview button I get the text that normally comes up before the intro! Is that normal... this is my first attempt at an outro...

 I can't understand why my original init.sqs would be affecting the outro?

 :-[

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Problem with 'setbehaviour' and captives...
« Reply #12 on: 28 May 2004, 23:08:07 »
Problem solved (though I'm not sure why!)

 I completely deleted the outro and started again... and now it's all working fine. Nothing is different in the new outro, so I have no idea why it didn't work the first time. Still, it works now, so I'm not complaining.

Cheers for all the help and suggestions, I hope to post the finished mission soon...

 :)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problem with 'setbehaviour' and captives...
« Reply #13 on: 28 May 2004, 23:25:38 »
Sometimes, OFP is just like that.    :P
Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
Re:Problem with 'setbehaviour' and captives...
« Reply #14 on: 29 May 2004, 00:09:10 »
One more solution had the other not worked.

If the East guys aren't doing much at all or are not involoved in any moving or stuff then group them to a west unit who has a higher rank then they do and in the west guys init field put

deletevehicle this


Then the east guys are not considered east anymore and SAFE and AWARE should work great.