OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gundernak on 13 Jan 2004, 22:52:03

Title: how to define unit has no weapon?
Post by: gundernak on 13 Jan 2004, 22:52:03
hi again,

Could you help me to define that a soldier has no weapon.

It is ok as well if I can check a condition when the unit does not have M16 and M60 and M21 particularly...

How nice could be a hasNotWeapon command... ;)
Title: Re:how to define unit has no weapon?
Post by: HuNtA on 13 Jan 2004, 23:02:04
hmmm, something like this could work:
make a trigger, and put this in its condition:
!player hasWeapon "M16"
and then put in the activation of what U want it to do

then, make another 2 triggers which each have 1 of the following in em:
1 with
!player hasWeapon "M60"
and 1 with
!player hasWeapon "M21"
Title: Re:how to define unit has no weapon?
Post by: gundernak on 13 Jan 2004, 23:07:40
!unitname hasWeapon "M60" is an syntax error!

unfortunately
Title: Re:how to define unit has no weapon?
Post by: Planck on 13 Jan 2004, 23:35:28
How about :

unitname !(hasweapon "M60")

Just a shot in the dark.


Planck
Title: Re:how to define unit has no weapon?
Post by: gundernak on 13 Jan 2004, 23:42:28
neither, no such syntax
Title: Re:how to define unit has no weapon?
Post by: Planck on 13 Jan 2004, 23:47:55
Something must work....hmmmmmm

Try :

!(unitname hasWeapon "M60")

Otherwise I will have to load up the game and experiment.


Planck

Title: Re:how to define unit has no weapon?
Post by: gundernak on 14 Jan 2004, 00:00:19
 :)

do not load the game, it is working now!!!

thanks