Home   Help Search Login Register  

Author Topic: Yet Another Question  (Read 1265 times)

0 Members and 1 Guest are viewing this topic.

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Yet Another Question
« on: 25 Jun 2005, 12:09:33 »
is there any possible way for a triggerto be activated the second a player takes the gun off his back?
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Yet Another Question
« Reply #1 on: 25 Jun 2005, 12:45:29 »
I'm not sure but I think this should be possible. In the first mission in the American campaign of OFP you will have to get back in line with your gun on your back after running to the truck. The only thing is, I don't know the command.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Yet Another Question
« Reply #2 on: 25 Jun 2005, 13:10:02 »
@ofpfeak - posts like that are less than helpful.

@ding - use the behaviour command. gun on back is "safe", gun in hands is "aware/combat". to check it in a trigger, use this in the condition field -

Code: [Select]
((behaviour player == "aware") or (behaviour player == "combat"))
that should do the trick.

CrashnBurn

  • Guest
Re:Yet Another Question
« Reply #3 on: 25 Jun 2005, 13:52:52 »
or alternatively-

(behaviour player != "safe")

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:Yet Another Question
« Reply #4 on: 25 Jun 2005, 14:23:22 »
hmm no.. it dosnt seem to work properly. here is the scenario:

i start in a little coartyard in Lipany, there is a Cop in the street, i buy a glock from a guy at a gun stall in the coart yard, i put the gun on my back, i walk out into the street.. now what i want to do here is to when i take my gun off my back he starts shooting at me, but while i do have my gun on my back he dose nothing.

so i have made the trigger in the street with:
((behaviour player == "aware") or (behaviour player == "combat")) && this
in it, i walk out into the stret with gun on back and get shot :(, happens when i dont have a gun too, same thing with:
(behaviour player != "safe") && this
the player always even without a weapon seems to be either aware or safe
« Last Edit: 25 Jun 2005, 14:37:59 by Ding »
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Yet Another Question
« Reply #5 on: 25 Jun 2005, 14:51:56 »
okay, i take it you're using 'setcaptive' to make the player invulnerable until the weapon comes out?

i've just tested this and it does seem that the player's behaviour mode won't go from 'aware' to 'safe' when the weapon goes on the back.

i would suggest explicitly setting the player's behaviour to 'safe' when you buy the weapon - that way you have a guaranteed starting point.

as an aside, it may not matter much, but i'd put the 'this and' before the other stuff in the trigger's condition field, not after...

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:Yet Another Question
« Reply #6 on: 25 Jun 2005, 17:13:49 »
well what actually is happening is that the Player is a friendly until he activates the trigger which causes a script which sets his rating to -9999 and adds a weapon + ammo to the police officer, so i dont use the setcaptive command
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Yet Another Question
« Reply #7 on: 25 Jun 2005, 18:34:48 »
I think a rating of -9999 will just about guarantee you will get shot.


Planck
I know a little about a lot, and a lot about a little.

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:Yet Another Question
« Reply #8 on: 25 Jun 2005, 21:01:05 »
but it only happens when the trigger is activated, and i dont want the trigger to be activated until the player has there weapon out
"If I remain lost and die on a cross, atleast I wasn't born in a manger"