function DelayCommand (float fSeconds, action aActionToDelay)
Delay aActionToDelay by fSeconds.
- No return value, but if an error occurs, the log file will contain "DelayCommand failed.".
It is suggested that functions which create effects should not be used as parameters to delayed actions. Instead, the effect should be created in the script and then passed into the action.
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
If you use a series of delay commands in a row, notice that the time is in seconds from the beginning, not from the last delay command. So, if you want something to happen at ten-second intervals, you need to have delays of 10, 20, 30, and so on, not a series of 10's.
DelayCommand(15.0, AssignCommand(oPraying,SpeakOneLinerConversation("ck_pray_maiden"))); DelayCommand(25.0, AssignCommand(oPraying,SpeakOneLinerConversation("ck_pray_mother"))); DelayCommand(35.0, AssignCommand(oPraying,SpeakOneLinerConversation("ck_pray_crone")));
- Return type: void
- Include file: nwscriptdefn