View Single Post
Penalty

Banned

Joined: Aug 2009

Posts: 33

Penalty is doing well so far

Sep 1, 2009, 06:15 AM
Penalty is offline
Reply With Quote
You're overcomplicating it, Mike. Remember that this is a scripting language meaning there should be much simpler solutions than trying to stick your variables in some unused jj2 memory. I am thinking about implementing two separate script contexts, the first one being game-wide and the second being system-wide. Each time a new level loads, the game context would load up an appropriate script that persists throughout the game until the level cycles while the system context is automatically created whenever the library starts up and persists throughout the entire game (level cycles, main menu, high score, credits, everything) until the game unloads. So if you were to put a custom object inside the system-wide context it would persist through level cycles. Then all you need to do is write down the desired variables to this object and have them retrieved again as soon as a new level loads - OnGameBegin().

NOTE: This is just a concept.