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.

Questions about Event Spawner [Resolved]

I was looking at Seph's Event Spawner, truely awesome! :thumb:

However, I was thinking of using this for my XP Vehicle system, and I was wondering if there was any way to 'delete' these events from the map?

For instance, when the player 'enters' the vehicle, I want the vehicle to be deleted, then when he exits later on whichever map they're on, the vehicle is spawned in it's place. Is this possible, or can you write it into the system if not Seph? :D
 
Events are not saved when you leave the map (unless when ending the event, you choose to save the event). So you can just use the erase event command. Yes, you will be able to end up spawning multiple events on a map before you leave and re-enter, but that shouldn't be a problem.
 
I'm sorry, I just resolved my own question thanks for your help!

Okay, this should be the last question of the day... the method works fine, but it's not writting the call script correctly. I looked at the instructions over 'n over and modified it to fit the syntax the best I could, here's the lines.

Code:
#-----------------------------------------------------------------------------
  # * Exit Vehicle (and spawn a new one)
  #-----------------------------------------------------------------------------
  def self.exit
    vehicle = $game_player.vehicle.to_s
    $game_system.menu_disabled, $game_system.save_disabled = false, false
    actor = $game_party.actors[0]
    actor.set_graphic(@actor_name, @actor_hue, @battler_name, @battler_hue)
    Event_Spawner.create_event($game_player.x, $game_player.y, "Vehicle")
    Event_Spawner.set_page_graphic({'c_name' => vehicle})
    Event_Spawner.add_event_command(108, ['Vehicle'])
    Event_Spawner.add_event_command(108, [vehicle])
    Event_Spawner.add_event_command(355, ['$game_player.enter_vehicle("#{vehicle}")'])
    Event_Spawner.add_event_command(355, ['event = get_character(0)'])
    Event_Spawner.add_event_command(355, ['$game_map.delete_event(event.id)'])
    Event_Spawner.end_event
    $game_player.vehicle = nil
    $game_player.step_anime = false
    $game_player.refresh
  end
end

It only tells me simply that a syntax error has occured, or undefined method 'event' for Interpreter:Class or something amongst that nature, so I'm sure its an error in the way I made the Spawn event do my call script. Can you tell me what I wrote wrong? Here's what it should actually look like in Event form.

@> Comment: Vehicle
@> Comment: Airship
@> Script: event = get_character(0)
@>          $game_player.enter_vehicle("Airship")
@>          $game_map.delete_event(event)
@>

And "Airship" needs to be whatever name the vehicle is stored in '$game_player.vehicle'.
 

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