Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Save the state of map events.

Has anyone figured out how to use this script properly?
And why does:

line 12: attr_reader :event

create an error?

This is a really helpful script, but can someone please make these minor clarifications for all?
Also:


$game_map.events[@event_id].record_state

does not fit in one line, when pasted in the "event script command" is that a problem for the script?
Do I input the event [id] e.g. "$game_map.events[@event_010].record_state" to record the state of only that event, or does this script record the state of all events in a specific map. Or does it record the event state of all events in all maps?
 
Demo uploaded. The text version of this script had some characters messed up.

Also,

$game_map.events[@event_id].record_state

has to be broken like this:

$game_map.events[@event_id].
record_state

The script records the state of the event in which you call $game_map.events[@event_id].record_state at the moment you call it. See how it is used in the demo.
@event_id is a variable that stores the id of the event on which the script command is executed, you are not supposed to change it into something like @event_134. However you can make a call like

$game_map.events[3].record_state

if you want to save the state of event number 3 from another event.
 
Useful script, but I'm not sure if I will need it or not.. If I ever make a really complicated RPG (a puzzle one, most likely) I'll use it. It's very nice!!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top