Home   Help Search Login Register  

Author Topic: Another question!  (Read 2959 times)

0 Members and 2 Guests are viewing this topic.

seanver

  • Guest
Another question!
« on: 21 Aug 2002, 18:08:28 »
Is it possible to check wether or not a soldier has a weapon on this hands?

mikeb

  • Guest
Re:Another question!
« Reply #1 on: 21 Aug 2002, 18:11:49 »
UNITNAME hasweapon WEAPONNAME

this works

Navy_Seals

  • Guest
Re:Another question!
« Reply #2 on: 21 Aug 2002, 18:12:49 »
U r planning on bombing the forum board with every possible question u got, ain't u?!  ;D

unitname HasWeapon "M16" or unitname HasWeapon "HK"

seanver

  • Guest
Re:Another question!
« Reply #3 on: 21 Aug 2002, 18:13:08 »
Tried and it checks only if the solider has the weapon. Not if he has the weapon in his hands or in his back.
« Last Edit: 21 Aug 2002, 18:21:41 by SeAnVeR »

Bremmer

  • Guest
Re:Another question!
« Reply #4 on: 21 Aug 2002, 18:39:40 »
I think the behaviour of a unit dictates whether he has his weapon in hand or on back.

behaviour unit = safe or careless -> weapon is on back
behaviour unit = aware, combat or stealth  -> weapon is in hand

For a definitive answer you should combine this with the hasweapon command, since its possible to have aware/combat/stealth with no weapon at all.

Cheers

seanver

  • Guest
Re:Another question!
« Reply #5 on: 21 Aug 2002, 18:57:38 »
that doesn't work . I explain what I want:

 I want a mission where you -the player- have to revenge your parent's death, so you go with a glock 17 to kill the murderers. If they see that you have a weapon, they'll start shooting you. If they don't see it, they won't.
« Last Edit: 21 Aug 2002, 19:02:23 by SeAnVeR »

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Another question!
« Reply #6 on: 21 Aug 2002, 19:15:20 »
Bremmer's got it, put this in the condition field of a trigger

behaviour player == "aware" && player hasWeapon "glock"

and on the onactivation field

player setcaptive false

seanver

  • Guest
Re:Another question!
« Reply #7 on: 21 Aug 2002, 19:24:42 »
It doesnt work. But if I put behaviour aP == "safe" in the condition line of the trigger, guy dofire aP and aP in the On Activation field and setbehaviour "SAFE" in aP's init field, then it works. So perhaps the behaviour is not changed when the player puts a weapon in his hand.

mikeb

  • Guest
Re:Another question!
« Reply #8 on: 21 Aug 2002, 19:35:17 »
I think the behaviour thing only works perfectly when you're using an AI unit.

The only other possibility I can see is if you just cater your mission to meet the demands of the game.

E.G.

A cutscene with a "friend" who works at the enemy base planting the gun for you to collect.  So gettinginto the base is no problem but once you have the weapon (has weapon command) then you must keep hidden.  I had a very similar idea for one of my missions where you were a spy and could only be identified by the intelligence officers.  Only if they saw you would your cover be broken (using the knowsabout command).  Other soldiers just treated you as one of their own.

The reason I did it this way was to get around the exact problem you're having.  You could even do a pre-mission of killing an enemy soldier and taking his clothes(?)

seanver

  • Guest
Re:Another question!
« Reply #9 on: 21 Aug 2002, 19:43:51 »
Hmm Ill try the knowsabout command. If they recognize the player then they'll start shooting him. How does that command exactly work?

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:Another question!
« Reply #10 on: 21 Aug 2002, 19:44:47 »
ok glocks doesn't seem to change your behaviour  ???, it works ok with m16.

mikeb

  • Guest
Re:Another question!
« Reply #11 on: 21 Aug 2002, 19:47:17 »
Just replaced my old comref with the knew one which seems to have got it wrong and I can't remember!

I think it's

UNITNAME knowsabout TARGETNAME #

where # is a number 0-4.  4 being complete knowledge of the target's type, position etc.  Anyone else out there remember how to use it?

mikeb

  • Guest
Re:Another question!
« Reply #12 on: 21 Aug 2002, 19:49:49 »
and of course when that condition is met just switch from setcaptive true to false.


WAIT!!!  Actually if you combine that with a distance-from-the-soldiers-type command then they will only start firing if they know about him AND are close enough to realise he is actually carrying a small sidearm.....

Would that be OK?

seanver

  • Guest
Re:Another question!
« Reply #13 on: 21 Aug 2002, 19:54:29 »
Yeah, its ok, more ore less a good distance might be 10 meters, mightn't be?

mikeb

  • Guest
Re:Another question!
« Reply #14 on: 21 Aug 2002, 19:59:03 »
Just play around and see what works.  Once anyone else on the forum reveals exactly how the knowsabout command works with its different levels then, with a bit of fiddling, you should get the right effect.

EG. Only if the soldiers know EXACTLY what and where you are will they attack.

I've looked through the whole comref and can't see any other real possibilities unfortunately...