Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
How do I keep a trigger over a specific unit?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How do I keep a trigger over a specific unit? (Read 706 times)
0 Members and 1 Guest are viewing this topic.
Swatdog
Guest
How do I keep a trigger over a specific unit?
«
on:
24 May 2005, 05:43:43 »
How do I keep a trigger over a specific unit? Basically what I want to do is create an "arresting" script. So like when you approach a certain unit the trigger will detect you are near him and it activates a script to determine randomly if he will run for it, or put hsi hands in the air. (I believe I know how to do the random reaction)
Logged
THobson
OFPEC Patron
Former Staff
Re:How do I keep a trigger over a specific unit?
«
Reply #1 on:
24 May 2005, 05:53:29 »
You need to have a script that is looping and keeps repositioning the trigger.
Give the trigger a name, say
trig1
Give the unit a name, say
unit1
the script should look something like:
#loop
~2
trig1 setPos getPos unit1
goto"loop"
Logged
Swatdog
Guest
Re:How do I keep a trigger over a specific unit?
«
Reply #2 on:
24 May 2005, 07:59:10 »
Ah ok, I thought there was a more complicated way than that.
Thanks.
Logged
ACF
Members
Llama?? Ain't that French for tanks?
Re:How do I keep a trigger over a specific unit?
«
Reply #3 on:
25 May 2005, 23:18:41 »
There is a simpler way that may be adequate - just a boring old stationary trigger with a condition like:
you
Distance
certainunit
< 5
and an OnActivation that runs your script. This saves you the looping script and whatever script you need to extract
certainunit
from the trigger list
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
How do I keep a trigger over a specific unit?
Top of page