User Tools

Site Tools


simplescripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
simplescripts [2017/08/19 05:49]
Lee
simplescripts [2017/08/19 05:49] (current)
Lee
Line 15: Line 15:
 Create a **[[Light]]** on a **[[maps|Map]]** of your choosing. Then create a **[[Timer]]** with "Every Interval"​ set to a small value like 0.025 seconds. Then inside the "Every timer tick" trigger, use a "​Position Light" event to move the **[[Light]]** to the player'​s X and Y coordinates:​ ''​Actor("​main"​).X''​ and ''​Actor("​main"​).Y''​ Create a **[[Light]]** on a **[[maps|Map]]** of your choosing. Then create a **[[Timer]]** with "Every Interval"​ set to a small value like 0.025 seconds. Then inside the "Every timer tick" trigger, use a "​Position Light" event to move the **[[Light]]** to the player'​s X and Y coordinates:​ ''​Actor("​main"​).X''​ and ''​Actor("​main"​).Y''​
  
-For an added layer of depth, you may wish to create a battery that slowly depletes as the light is in use and re-charges when the light is turned off.+For an added layer of depth, you may wish to create a battery ​**[[variables|Variable]]** ​that slowly depletes as the light is in use and re-charges when the light is turned off.
  
 ---- ----
simplescripts.txt ยท Last modified: 2017/08/19 05:49 by Lee