OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: che__guevara on 08 Jun 2005, 14:27:26

Title: another noob question
Post 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
Title: Re:another noob question
Post by: THobson on 08 Jun 2005, 14:40:49
Well if:

leader hasWeapon "revolver"

works  then try:

{_x hasWeapon "revolver"} count units group leadername > 0

Title: Re:another noob question
Post by: The-Architect on 08 Jun 2005, 18:51:16
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.
Title: Re:another noob question
Post by: THobson on 08 Jun 2005, 22:08:59
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.
Title: Re:another noob question
Post by: RujiK on 08 Jun 2005, 22:48:14
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.
Title: Re:another noob question
Post by: che__guevara on 09 Jun 2005, 11:04:44
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
Title: Re:another noob question
Post by: THobson on 09 Jun 2005, 12:13:30
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.