Difference between revisions of "Special Variables"
no edit summary
imported>JOG |
imported>JOG |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Some variables are predefined and handled and/or updated by the game-engine itself. | |||
=='''Globals'''== | =='''Globals'''== | ||
{|border="1" cellpadding="5" cellspacing="0" | {|border="1" cellpadding="5" cellspacing="0" | ||
Line 45: | Line 41: | ||
* If all you want to know is if it is a new day (strictly meaning that the 12:00am boundary has been crossed), save the current GameDaysPassed into a SHORT variable (lastDay) and then when you want to do your comparison, create a SHORT (currentDay) and set it to the current GameDaysPassed. If (currentDay - lastDay) >= 1, then a day has passed. By storing GameDaysPassed in SHORT variables you trim off the factional hours that live in the decimal places. If you use floats instead of SHORTs you will essentially be checking if "24 hours has passed" rather than, "is it the next day." | * If all you want to know is if it is a new day (strictly meaning that the 12:00am boundary has been crossed), save the current GameDaysPassed into a SHORT variable (lastDay) and then when you want to do your comparison, create a SHORT (currentDay) and set it to the current GameDaysPassed. If (currentDay - lastDay) >= 1, then a day has passed. By storing GameDaysPassed in SHORT variables you trim off the factional hours that live in the decimal places. If you use floats instead of SHORTs you will essentially be checking if "24 hours has passed" rather than, "is it the next day." | ||
=='''Locals'''== | =='''Locals'''== | ||
There are also local variables with special functions: | There are also local variables with special functions: | ||
{|border="1" cellpadding="5" cellspacing="0" | {|border="1" cellpadding="5" cellspacing="0" | ||
Line 146: | Line 78: | ||
1 = Continously subtract damage as long as actor is in contact with trap. | 1 = Continously subtract damage as long as actor is in contact with trap. | ||
|} | |} | ||
[[Category:Variables]] | [[Category:Variables]] |