Home   Help Search Login Register  

Author Topic: getting enemies to detect behaviour of captives  (Read 741 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
getting enemies to detect behaviour of captives
« on: 04 Jul 2003, 05:51:07 »
OKAY THIS IS WHAT I MEAN....
How do I trigger something to happen when a player pulls out his gun?  

im trying to do this undercover cop scenario where he pulls out his gun and that makes the enemy shoot at him and pull out their guns.  id even like to go as far as to say if i fire a shot then the enemy firest at me since id still be a captive at that point.  it'd be neat to control things a little further.  
« Last Edit: 04 Jul 2003, 06:57:03 by BronzeEagle »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:getting enemies to detect behaviour of captives
« Reply #1 on: 04 Jul 2003, 09:41:29 »
Well, I dunno about PLAYER but at least you can check the AI:

  Behaviour Bob not="Safe"

This trigger would fire if Bob went into a frenzy (anything not-safe, off course).
Try it out on the player if ya like... even though I guess it would  be better to do like this:


Player hasWeapon "weaponName"

as condition.

Just remember that THIS kind of trigger would fire as soon as you have the gun,
so it won't help to put it in yer pocket  :-X

later :-*



Offline Burn

  • Members
  • *
Re:getting enemies to detect behaviour of captives
« Reply #2 on: 04 Jul 2003, 10:57:37 »
Quote
Player hasWeapon "weaponName"

as condition.

Just remember that THIS kind of trigger would fire as soon as you have the gun,
so it won't help to put it in yer pocket
Ok, this is just a suggestion. Why not make one script that gives the player the gun and a second that takes away the gun. And then execute them in two different actions...

So it would be:
Player AddMagazine "IngramMag"
Player AddMagazine "IngramMag"
Player AddMagazine "IngramMag"
Player AddMagazine "IngramMag"
Player AddWeapon "Ingram"
^^^^^^^^^^^^^^^^^^
The above in one script and:
RemoveAllWeapons Player
^^^^^^^^^^^^^^^^^^
that in another one...

And the syntax fo addaction was:
ID = Player addAction ["draw weapon","script.sqs"]

Where ID is the id for the action (u can name it anything u want) that enables the scripter to remove the action once its been executed:
Player removeAction ID
And the "draw weapon" is the text that is displayed in the action menu.
And finally "script.sqs" is the name of the script.

This could work, the only thing that would need to be resolved is that when the first script that adds the weapon also adds those mags every time u exec. it... meaning that it's inpossible for the player to get out of ammo, and thats just not realistic... any solutions anyone?

BronzeEagle

  • Guest
Re:getting enemies to detect behaviour of captives
« Reply #3 on: 04 Jul 2003, 15:26:09 »
that behaviour bob not safe idea sounded the best but when put to the test it didn't work.  i wonder what is the setting for a player with his gun out that i could make that a condition.  for some reason in the behaviour bob not safe thing, i typed it exactly as it looked but it didn't recognize the word not.  so i believe it has to be something like that.  

BronzeEagle

  • Guest
Re:getting enemies to detect behaviour of captives
« Reply #4 on: 05 Jul 2003, 05:23:12 »
im going to try the remove gun and add gun one because when a player has a gun it looks like he's reaching for it anyways so im going to do something like reach for gun and be casual.  

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:getting enemies to detect behaviour of captives
« Reply #5 on: 05 Jul 2003, 12:27:12 »

How do I trigger something to happen when a player pulls out his gun?  

im trying to do this undercover cop scenario where he pulls out his gun and that makes the enemy shoot at him ...



You could do it another way:


     This setCaptive True

in your INIT field, and then (when you have a weapon, i.e. the "Player hasWeapon..." trigger) :

     Player SetCaptive False


If your a 'natural' enemy of the soldiers, they'll start firing at ya when yo're no longer a captive-true guy.


BronzeEagle

  • Guest
Re:getting enemies to detect behaviour of captives
« Reply #6 on: 05 Jul 2003, 16:30:21 »
if i were concealing the weapon they'd still fire at me though.  i want some stealth in the fashion that they don't see my gun.  

Offline Burn

  • Members
  • *
Re:getting enemies to detect behaviour of captives
« Reply #7 on: 07 Jul 2003, 20:37:11 »
Quote
if i were concealing the weapon they'd still fire at me though.
No , no, no, no, no, no, and nooo!!! as Tomb said, if you use the
player setcaptive true command they won't shoot at you...
and then player setcaptive false will allow them to kill you again ;)...

BronzeEagle

  • Guest
Re:getting enemies to detect behaviour of captives
« Reply #8 on: 07 Jul 2003, 21:50:07 »
but you don't see the effect im trying to produce.  guy is captive and has a gun not pulled out yet.  i want a condition that says when his gun is in his hand that he won't be a captive anymore and they'll fire at him.  now player hasweapon works like if you even have the gun in your arsenal revealed or not they'll shoot at you, showing or not and thats not the effect im going for.  

Offline Burn

  • Members
  • *
Re:getting enemies to detect behaviour of captives
« Reply #9 on: 08 Jul 2003, 07:48:51 »
Ok... try adding alitle delay to it, let's say 5-8sec. before they start to react... :beat: