Operation Flashpoint Dragon Rising OFDR Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

help with timers??

2 posters

Go down

help with timers?? Empty help with timers??

Post by nepgeargo Fri 22 Mar 2013, 17:56

tvig0r0us wrote:You will have to use OFP commands. The idea behind the edx is to expand the functionallity of the editor from a coding perspective. As I've put it before, it's like having a toolbench for missions and the edx just puts alot more tools on the bench for you to use. I recommend looking over the documentation I've posted and download the quickstart module to get you going with the edx on the right foot.

Cheers Very Happy

i dont know how to use the timer properly... if i want the chopper named "mh60" to move to "lz" 15 secs after the player "b1" is on board, how should the script look like? and... it will be much easier if i can just get the chopper to move after the whole fireteam has got in =D but i dunno how to script that =/
nepgeargo
nepgeargo

Points : 62
Reputation : 0
Join date : 2013-03-20

Back to top Go down

help with timers?? Empty Re: help with timers??

Post by TheGeneral Sat 23 Mar 2013, 00:27

did you read my reply about the timers?? they work very much the same way using the OFP prefix except you use the EDX prefix.

this is just a guess at your code.


Code:
function onMount(vehicleName,unitName,echelonName)
    if vehicleName == "mh60" and unitName == "yourUnit" then
    EDX:simpleTimer("mhtakeoff",15000) -- we call the event here
end
end

function mhtakeoff() --This is known as an event handler which is what is now used to fire Timers.
    EDX:deleteTimer("mhtakeoff")
    OFP:move("pilot","lz","ADDTOFRONT")
end

Now, I say a guess only because you haven't posted an example of what you tried. Hopefully you will be able to translate this into your script. This is a basic example to demostrate the use of the new format for the timers.


Previously we were calling the timer as:


Code:
OFP:addTimer("myTimer", 15000)

then firing it using

Code:
function onTimer_myTimer()
OFP:removeTimer("mytimer")
    my code etc.
end.
TheGeneral
TheGeneral
Admin

Points : 780
Reputation : 35
Join date : 2012-12-15

http://maniacaldog.wix.com/keepdralive

Back to top Go down

help with timers?? Empty Re: help with timers??

Post by nepgeargo Sat 23 Mar 2013, 04:03

Thankx for the help!
nepgeargo
nepgeargo

Points : 62
Reputation : 0
Join date : 2013-03-20

Back to top Go down

help with timers?? Empty Re: help with timers??

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum