OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: che__guevara on 08 Jun 2005, 14:27:26
-
I don't know how to make a whole group to switch a trigger.
Some of you will remember my yesterdays question about a gun. well, i got the gun in the truck, i want the sentries shoot as soon as someone got the pistol from truck, currently only works with leader...looks something like this:
leader hasWeapon "revolver"
basically I don't know how to make that anybody from group that grab weapon switch the trigger.
I think is such a noobie quiestion tht nobody bother to explain
Thnx a lot
-
Well if:
leader hasWeapon "revolver"
works then try:
{_x hasWeapon "revolver"} count units group leadername > 0
-
It's not a nooby question mate, I didn't learn the _x stuff for ages. Probably because I never needed to though. Maybe if I wanted it early I would have learned it sooner.
-
I agree. It took me ages to get the hang of the _x stuff. Mainly because most replies to questions do it the long way, so you don't get many examples.
-
Hah! I had _x down pretty soon! however it took me ages to figure out you could make scripts OUT of the game, sadly. So all my missions were only mission.sqm with no scripts :/
I remember trying to make cameras in a trigger. Made me very mad it wouldnt work.
-
Well thank you all, it did work, I just copy and paste the _x stuff and works fine, i don't know wat it means tho, but it works ;D
maybe wasn't a noob question; I thought that the solution was to group all and make the trigger go something like this:
GroupAlpha hasWeapon "revolver"
The thing is that i don't know how to group, never had to use it
-
I am glad it worked.
As an exercise why not go to the comref and look up each of the commands - that is how I figured out how to do stuff like this.