OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: marcus3 on 18 Mar 2005, 14:36:35
-
I need it where when you walk up to some one they say something.
But when you walk up to them with a gun they say something different. But I don't want to right all the guns one by one in the script so I use a array like this
When you walk up to guy script runs and I the script there is this
Stuff he wood say if you did not have gun.
@ (Man hasweapon guns)
Man sidechat "don't shoot"
And in the init script there is this.
Guns = "gun" and "gun" and "gun" and "gun"
gun is like "ak47" (but I am lazy to Wright all the gun names in there)
So when I do this it don't work.
why not can you help?
thanks
-
trying guns = "gun" + "gun" + "gun" would form a string not a array, try something like this
_man = _this select 0
?(count weapons _man)<1:_man globalchat "IM UNARMED"
?(count weapons _man)>0:_man globalchat "I HAVE A GUN, SUCKER"
-
i think i just need to not lazy and just typ in all the stuff.
thanks for the help