FANDOM


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.

For example:

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.

For example:

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.