Board Thread:Suggestions and Ideas/@comment-24386245-20141128132957/@comment-15296152-20141204002838

Well, the GVal stuff was meant to add some advanced handling for the editor, but it's not really fleshed out. First, let's talk about Game States. Within the program, there are 127 Game States, and they can either be set or cleared. They are used for entity triggers. If you you take a look at the options for each entity you place, you will see a Trigger section. The two triggers are Spawn and Remove, and they are triggered based on if a Game State is Set or CLR'ed.

For Spawning, it is when the entity module becomes visible on the screen in the game. When it is visible, it checks this state. If the condition is true, then the entity will spawn. For Removing, it's based on when the entity is removed (excluding when it goes off-screen). This is either when the entity is destroyed or picked up (like an energy capsule). When that happens, it assigns a selected Game State to the condition assigned.

A simple example of using Game States. Place an Energy Capsule in a level that is greater than 1 screen-width. Place it on one side. Test the level. Grab the capsule, and move to another section of the sublevel, and then return to where the capsule originally was. It should reappear. Now, back to the Editor. In that entity's options, assign the Spawn trigger to SET and 1, and the Remove trigger to CLR and 1. Test the level, but first, walk away so the capsule goes off-screen. Come back, and it should reappear. Now grab the capsule, walk away, and then go back. The capsule shouldn't reappear.

Each Game State is assigned the SET flag upon a level that was loaded. There are 2 entities directly related to Game States. One for On/Set, and one for Off/CLR.

Now, GVal stuff. This was mainly for the teleporter system in Wily Castle 5, but if you can find some use in them, go right ahead. They affect the central Game Value variable, either setting it to a specific value, subtracting from it, adding to it, or examining what the Game Value is. It's a bit complicated. Maybe I'll make a level that demonstrates their use at some point.

Again, the entities aren't really fleshed out, as they were mainly used for one of the Wily Stages, so they may not be of much use for anyone.