OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Lihamatti on 12 Jul 2004, 14:35:17

Title: How to make something happen when anyone does something? :D
Post by: Lihamatti on 12 Jul 2004, 14:35:17
Yes, not very good subject but try to deal with it. OK.
How can I make something happen when a man (not a specified man, anyone) does something? For Example if a man comes close to some point, he will die. Of course I could put a script in every man's init but it doesn't seem very intelligent. So I need a script that knows if any man is in some area, and who the man is.
Title: Re:How to make something happen when anyone does something? :D
Post by: AnarCHy on 12 Jul 2004, 14:43:19
well, who it is i dont know, but put a trigger wit activation --> anybody and it will happen when "anybody" comes into the triggers' field
Title: Re:How to make something happen when anyone does something? :D
Post by: SpawnFodder on 26 Jul 2004, 17:30:28
theres a napalm script which has a section which kills anyone who comes within a certain distance of a marker, look for that and try and adapt it to do what you want it to
Title: Re:How to make something happen when anyone does something? :D
Post by: macguba on 26 Jul 2004, 18:33:29
When you want to detect something, what you need is a trigger.    In fact triggers used to be known as "sensors", which is a good name for them.     They "sense" when an event occurs and "trigger" a consequence.

I suggest you head over to the Editors Depot - Tutorials - Getting started and read up on triggers.