Home   Help Search Login Register  

Author Topic: Problem with Triggers  (Read 1585 times)

0 Members and 1 Guest are viewing this topic.

Offline Shadow_Spyder

  • Members
  • *
    • 31st MEU ArmA Realisim Unit
Problem with Triggers
« on: 26 Nov 2007, 22:20:16 »
Ok, SO I pretty much completed a mission I was working on, but ran into some problems while testing. Basicly I have triggers which will show up some text for hints to immitate "speaking with an informant" as well as triggers which will set-off IEDs when you get within range. Here is the problem.... airplanes and choppers will set these triggers off by flying over them, which pretty much ruins the mission. Firstly, if your doing something at one side of the city and a chopper flys in from another side and activates an IED, nothing gets exploded and no one gets hurt, no suprise for the ground troups ect... also, for the "speaking with informant", the chopper flys over that on accident and a message appears on the screen, but it seems stupid because none of our ground troops have even got to that location yet. Is there either 1: another way to set-off these triggers to where the planes/choppers wont set them off... or 2: a second way of working it without triggers that will do the job without choppers or planes setting off the triggers? Thanks!

Offline Loyalguard

  • Former Staff
  • ****
Re: Problem with Triggers
« Reply #1 on: 26 Nov 2007, 22:42:38 »
I believe you will find the answer in this thread that dealt with the same issue: SOLVED: Trigger Height

Good Luck!

Offline Shadow_Spyder

  • Members
  • *
    • 31st MEU ArmA Realisim Unit
Re: Problem with Triggers
« Reply #2 on: 27 Nov 2007, 00:51:50 »
Thanks for the link Loyalguard. Deffinitly points me in the correct direction, but I would appreciate a little help with what I just read.

Quote
Setpossing the trigger does not help though, the trigger area has no z axis..

What you need to do is to add a condition to the trigger condition field that let's the trigger activate only when the player is not in a vehicle and under a certain height..

Something like (this is just example, most likely won't work as is..)

Code: [Select]
(vehicle player) == player && (position player select 2)<2

He says that what he put down most likely wont work, so is there anything I can do to be sure it will work... or possibly just a confirmation saying it will work? Possibly someone can explain to me in baby language what each part of that code means so I can better understand it? Thanks.

#EDIT-removed the unnecessary quote, no need to quote the entire previous post you're replying to..     h-
« Last Edit: 27 Nov 2007, 08:00:48 by h- »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Problem with Triggers
« Reply #3 on: 27 Nov 2007, 01:25:58 »
What that trigger condition will do is activate when the player is on foot and no more than 2m above the ground. It doesn't actually use the trigger zone at all! Thus, it really isn't what you want at all.

Mr. Peanut's reply was correct though (it was only one post further on!), though here are some more examples for specific situations:
Code: (trigger condition set off by men on foot only) [Select]
("Man" countType thisList) > 0
Code: (trigger condition set off by men on foot or land vehicles only) [Select]
("Land" countType thisList) > 0
Code: (trigger condition set off by land vehicles only) [Select]
("LandVehicles" countType thisList) > 0

There is a vehicle class hierarchy is in the COMREF, in case you want to be more specific (for example, armoured vehicles only).
« Last Edit: 27 Nov 2007, 01:27:45 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Shadow_Spyder

  • Members
  • *
    • 31st MEU ArmA Realisim Unit
Re: Problem with Triggers
« Reply #4 on: 27 Nov 2007, 04:08:41 »
Thanks Spooner! So, If I just put
Code: [Select]
("Land" countType thisList) > 0 in the condition, then that will work or do I need to edit that at all or place it in a specific place?


#EDIT-removed the unnecessary quote, no need to quote the entire previous post you're replying to..     h-
« Last Edit: 27 Nov 2007, 08:01:26 by h- »

Offline Carroll

  • Members
  • *
  • Mission Designer (MP-"well tryin to capiche"
Re: Problem with Triggers
« Reply #5 on: 27 Nov 2007, 09:52:42 »
if you followed the link above, not sure if it's in there but this is what i used to get to work for me;

this && "LAND" countType thisList > 0

^ put this in the condition field of the trigger set off by either Blufor, Independant, etc
« Last Edit: 27 Nov 2007, 09:55:15 by Carroll »

Offline Shadow_Spyder

  • Members
  • *
    • 31st MEU ArmA Realisim Unit
Re: Problem with Triggers
« Reply #6 on: 27 Nov 2007, 16:03:56 »
Thanks. I did give it a test last night when I got home and figured out it didn't need any changing. Works like a charm. Thanks!