Home   Help Search Login Register  

Author Topic: Gun on shoulder setcaptive true  (Read 488 times)

0 Members and 1 Guest are viewing this topic.

Offline baikie

  • Members
  • *
  • I'm a llama!
Gun on shoulder setcaptive true
« on: 13 Feb 2005, 13:10:53 »
i want it so when anyone on a game has their gun on their backs setcaptive = true. what do i need to do (with a script of ingame) so that when a players guns out, they are not captive and when a players gun is on back they are captive.

DBR_ONIX

  • Guest
Re:Gun on shoulder setcaptive true
« Reply #1 on: 13 Feb 2005, 15:29:39 »
_unit = _this select 0

#loop
?(_unit combatmode = safe):_unit setcaptive true
?!(_unit combatmode = safe):_unit setcaptive false
#1
goto "loop"

;)
Not totaly sure of combatmode= bit.. There is the correct command which is...  ::)
- Ben

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Gun on shoulder setcaptive true
« Reply #2 on: 13 Feb 2005, 18:46:08 »
better recheck your scripting Onix.
You only put in one "=" sign (equals), so this tells the game Combatmode=safe so that it is NOT checking the combatmode but actually setting it!

I would suggest this:

Code: [Select]
_homieG = _this select 0

#reset
@(behaviour _homieG == "safe" or behaviour _HomieG == "Careless")
_homieG setcaptive true
@(behaviour _homieG != "safe" or behaviour _HomieG != "Careless")
_homieG setcaptive false
goto"reset"

The only problem with this is that it wil not work with the player because sometimes even when you have your gun on your back your behaviour is still "Combat"!
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline baikie

  • Members
  • *
  • I'm a llama!
Re:Gun on shoulder setcaptive true
« Reply #3 on: 14 Feb 2005, 02:36:40 »
thanks guys for the help, but i do want them for the player aswell as the AI, if anyone else or you guys know how to do it can you help. would setting a trigger in a script when a person select action put m16 in hand = setcaptive false and when selects action put m16 on back = setcaptive true?

Offline Blanco

  • Former Staff
  • ****
Re:Gun on shoulder setcaptive true
« Reply #4 on: 17 Feb 2005, 09:23:57 »
There was a script long time ago that did this...

I think the name of the topic was "spies", nhaaa I'm sure
Well..., it's not exactly the same, but it could help...



« Last Edit: 17 Feb 2005, 09:28:31 by Blanco »
Search or search or search before you ask.