Time for action — loading and saving levels with events
Now we are going to add the events into our editor to load and save levels to INI files.
1. Now we can switch over to the Event Sheet Editor to start the events for our editor. Start by creating a
Start of layout
event to set the INI file toAppPath & "Levels.ini
".2. Following that, create a sub-event for this to check if the global variable
CurrentLevel
isLess or equal
toLevelINI.ItemValue("Game", "NumCustomLevels")
.3. Create the action
Call function
of theFunction
object to call"LoadLevel
", a function we'll be using to load the level objects and background.4. Next, create a new event with the
MouseKeyboard
conditionMouse is over object?
to check if the mouse is overlapping theEditRegion
object.5. For this event, create the action
Set visible
for theEditRegion
object to make itInvisible
.6. Next, add the
System
actionSet group enabled
to set the group"Level Objects
" to enabled. We'll use this group later to handle the...