OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: beefhole1 on 23 Jan 2005, 07:03:22
-
I'm making a mission where you are a counter sniper protecting the president of nogova, and it's all done except I need the president to die after, say five minutes or so. I can't get the russian sniper to do it, he's too far away. Is there anyway to have a unit just die after a certain amount of time?
-
You could just script it...
Call it mankill.sqs
_man = _this select 0
~(numberofminutes * 60)
_man setdammage 1
exit
Replace numberofminutes with however many minutes you want, or remove everything in the brakets and put in the amount of seconds you want.
Call the script by the man you want to kill... IE.
[manname] exec "mankill.sqs"
-
Or you can just do a trigger with 300 in countdown. ;)
:beat: *Gets Shot* :beat:
-
Trigger countdown 300 + introtime (if U use 1)
But isnt the command & usefull here?
Can someone explain how to use it in this example?
-
Yes, examples are cool ;)
-
Trigger countdown 300 + introtime (if U use 1)
But isnt the command & usefull here?
Can someone explain how to use it in this example?
Both me and Armty's examples work in these conditions, I'm rather confused why we need to use the & thing....
-
Waiting for a time: line starting with '&'.
Example: &endTime is equivalent to @_time >= (endTime)
Just an idea,donno if this has advantages instead of ~
& is not much used in recent scripts,but it was in BIS missions.
-
Waiting for a time: line starting with '&'.
Example: &endTime is equivalent to @_time >= (endTime)
Just an idea,donno if this has advantages instead of ~
& is not much used in recent scripts,but it was in BIS missions.
I see what you mean now. Three ways to do the same thing... interesting.