| 08-15-2008, 09:16 AM | #1 |
Does the TriggerSleepAction work in executions calls correctly? The problem is if I want to call an interface function by using execute and I call it from another function, TriggerSleepAction functions will be ignored by the other function: JASS:function Lalala takes nothing returns nothing //some stuff call TriggerSleepAction(5.0) //some stuff endfunction function Bla takes nothing returns nothing //some stuff call Lalala.execute() //does not wait 5 seconds endfunction So, I could fix it if I would use the same TriggerSleepAction call in the function which calls the interface function but this won't be very useful. I can remember I was reading something about TriggerSleepAction functions in the vJass manual and it was something like: TriggerSleepAction calls do work in execute calls but they do not in evaluate calls. Unfortunately that doesn't answer my question. Maybe you know how to solve my problem in an easy way. |
| 08-15-2008, 10:27 AM | #2 |
You seem to want to call it. Execute creates a separate thread. |
| 08-15-2008, 11:36 AM | #3 |
JASS:function Lalala takes nothing returns nothing call BJDebugMsg("{") //some stuff call TriggerSleepAction(5.0) //some stuff call BJDebugMsg("}") endfunction |
| 08-15-2008, 02:12 PM | #4 |
JASS:function Lalala takes nothing returns nothing //some stuff call TriggerSleepAction(5.0) //some stuff endfunction function Bla takes nothing returns nothing //some stuff // As Griffen metioned, this starts a new thread. call Lalala.execute() // This will wait until Lalala is finnished. call Lalala() endfunction |
