Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global variables and Local Map variables.
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Global variables and Local Map variables.

Global variables will reset each time the script is run. (e.g. every time the player re-enters the map, or loads a saved game.) Using the API for variables will make them retain their value. As an example of how this could be problematic, consider a switch-case structure using a global variable used to run a scary event with the shadow roar, falling dust particles, sanity loss, etc etc. If the player (for some reason) exits the map and re-enters, the event might start over or stop partway through. Could be consequential if some critically important things happen during the event, like a door breaking or an item becoming "pickable".

Edit: Apjjm is still the sensei of everything.

(This post was last modified: 04-28-2012, 09:02 PM by palistov.)
04-28-2012, 08:58 PM
Find


Messages In This Thread
RE: Global variables and Local Map variables. - by palistov - 04-28-2012, 08:58 PM



Users browsing this thread: 1 Guest(s)