Changes between Version 14 and Version 15 of Triggers


Ignore:
Timestamp:
Jun 24, 2014, 9:37:02 PM (10 years ago)
Author:
Radagast
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Triggers

    v14 v15  
    103103}}}
    104104
    105 '''Note:''' both the `Trigger` prototype and the data you add directly to `this` can be accessed via `this`. But only the data added directly to `this` will be saved in a saved game. So although it's possible to add other stuff to the prototype than just functions, it shouldn't change throughout the game. Also note that functions can't be saved in saved games. So in short, functions should always be defined under the prototype, and never change.
     105'''Note:''' both the `Trigger` prototype (e.g. `Trigger.prototype.whatIWantedToSave`) and the data you add directly to `this` (`this.whatIWantedToSave`) can be accessed via `this`. But only the data added directly to `this` will be saved in a saved game (e.g. `this.myVar` will be saved but `Trigger.protoype.myVar` not!). So although it's possible to add other stuff to the prototype than just functions, it shouldn't change throughout the game. Also note that functions can't be saved in saved games. So in short, functions should always be defined under the prototype, and never change.
    106106
    107107== Registering triggers ==