Barebones function 210

From Unofficial QEdit Wiki Guide
Revision as of 18:06, 27 March 2013 by Japanaman2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Barebones function 210

Function 210: 210:

  • Function 210 = Part of player invincible, or delay/wait seconds countdown timer.

Player invincible, or delay/wait seconds countdown timer

You my want to make your players be invincible for short burst in your quests (commonly refereed to in game as a blessing), or just have there be a delay before an script occurs, or just have the players wait longer. This time code dose all that.

To use this code make a new function then start by using leti on... Register 70 = Player invincibility off = 00000000. Player invincibility on = 00000001. Register 72 = xxxxxxxx amount of time the timer will countdown in seconds. Then just call 210, or 211 depending on the needs of your quest and end with a ret.


Barebones function 210 = Function 210 threads function 211, and function 213.

Barebones function 211 = Function 211 threaded in function 210. Waits 1 frame. when register 72 equals 00000000 jump to function 212. Converts frames in register 71 to seconds in register 72. Subtracts 00000001 from the value of the time set in register 72. Jumps to function 211.

Barebones function 212 = Function 212 clears the registers used in this from of time also allowing the player to receive damage again.

Barebones function 213 = Function 213 threaded in function 210.waits 1 frame. Based on if register 70 is set to 00000001 on or 00000000 off the player will be invincible until register 72 equals 00000000. Jumps to function 213

Use

Function 210 threads function 211, and function 213.

How the function appears in the script


210:     thread 211 //Threads function 211
         thread 213 //Threads function 213
         ret 

Also see

thread, ret, Barebones function 211, Barebones function 212,

Barebones function 213