Using custom timers
2 posters
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING
Page 1 of 1
Using custom timers
Hello, I'm new to the mission editor and have gone through all the help documents
I'm still struggling with the timers though
I've created my own timer which sets of once the player is spotted by enemies (it's a stealth mission). It lasts for 600000 (which should be 10 minutes right?)
After ten minutes, the mission is failed but I don't know how to write the function.
The timer is called "USAlerted"
Could someone tell me how I should write it so that when the USAlerted timer reaches 10 minutes, the mission fails
Thank you!
I'm still struggling with the timers though
I've created my own timer which sets of once the player is spotted by enemies (it's a stealth mission). It lasts for 600000 (which should be 10 minutes right?)
After ten minutes, the mission is failed but I don't know how to write the function.
The timer is called "USAlerted"
Could someone tell me how I should write it so that when the USAlerted timer reaches 10 minutes, the mission fails
Thank you!
TheTurkishMoose- Location : England
Points : 6
Reputation : 1
Join date : 2015-11-19
Age : 28
Re: Using custom timers
Do you mean after player is spotted by enemies 10 minutes later the mission failed? If it is, write some code like this:
BTW, if you are using EDX, there are some better way to write codes.
- Code:
function onIdentified( identifiedID, identifierID)
--judge if player is spootted, if true
OFP: addTimer( "USAlerted", 600000)
end
function onTimer_USAlerted()
--the timer triggered
OFP:missionFailed()
end
BTW, if you are using EDX, there are some better way to write codes.
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: Using custom timers
Thanks for the help runerback, that was exactly what I was looking for - the "function onTimer_USAlerted()" part particularly!
I'm not sure what EDX means, sorry. I'm using the default mission editor editing the leve.lua file. Could you explain what you mean please?
I'm not sure what EDX means, sorry. I'm using the default mission editor editing the leve.lua file. Could you explain what you mean please?
TheTurkishMoose- Location : England
Points : 6
Reputation : 1
Join date : 2015-11-19
Age : 28
Re: Using custom timers
You can check it here:
Mission Editor Expansion
Mission Editor Expansion
runerback- Location : China
Points : 153
Reputation : 5
Join date : 2014-06-18
Re: Using custom timers
Thaks runerback, completely missed this!
TheTurkishMoose- Location : England
Points : 6
Reputation : 1
Join date : 2015-11-19
Age : 28
Re: Using custom timers
Okay so I had a look through all the EDX stuff and decided to just stick with the main editor. I know it talks about making mission making easier and more efficient, but I'm happier doing it the old fashioned way!
TheTurkishMoose- Location : England
Points : 6
Reputation : 1
Join date : 2015-11-19
Age : 28
Similar topics
» help with timers??
» simple timers in the EDx?
» OWP: Custom Sound App
» custom LUA functions
» custom sounds and ambient lighting
» simple timers in the EDx?
» OWP: Custom Sound App
» custom LUA functions
» custom sounds and ambient lighting
Operation Flashpoint Dragon Rising OFDR Forums :: OPERATION FLASHPOINT: DRAGON RISING :: OFDR EDITING
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|