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.

Little help with Sephiroth Spawn's Event Spawn Script

Hello everyone, I've been playing around with DerVVolfman's addon's for MrMo's ABS, and I'm making a game currently. I'm having a problem with the event spawn script though, I found a neat little tutorial on how to use the script but it doesn't seem to be working for some reason.

I'm trying to make it to where when an enemy dies, more monsters are spawned at its location. I created a separate script to predefine the spawned events

Code:
module Event_Spawner

  def self.SS_1(x, y)

     create_event(x, y, "SS1")

      set_page_graphic({'c_name' => "Spawn"})

      Event_Spawner.add_event_command(108, ['ABS'])

      Event_Spawner.add_event_command(108, ['ID 15'])

      Event_Spawner.add_event_command(108, ['Behavior 3'])

      Event_Spawner.add_event_command(108, ['Sight 5'])

      Event_Spawner.add_event_command(108, ['Sound 5'])

      Event_Spawner.add_event_command(108, ['ClosestEnemy true'])

      Event_Spawner.add_event_command(108, ['HateGroup [1,2,3,4,5,6,7,8,9,10,11,12,13]'])

      Event_Spawner.add_event_command(108, ['Aggressiveness 3'])

      Event_Spawner.add_event_command(108, ['Speed 3'])

      Event_Spawner.add_event_command(108, ['Frequency 3'])

      Event_Spawner.add_event_command(108, ['Trigger 0'])

      Event_Spawner.add_event_command(108, ['Respawn 0'])

      Event_Spawner.add_event_command(108, ['RespawnID 0'])

      Event_Spawner.add_event_command(108, ['Personality [1]'])

      Event_Spawner.add_event_command(108, ['AllyGroup [0,14,15,16,17,18,19,20,21,22,23,24]'])

      Event_Spawner.add_event_command(202, [0, 1, 22, 23, 2])

  end

end

Now I'm trying to call the event to be spawned with this event script command:

Event_Spawner.SS_1(28, 35)

I don't get any errors or anything, the event just doesn't seem to be spawning. Am I missing something here? Any advice would be greatly appreciate, thanks.
 
No idea if this would make any difference, but change line 2 to:

def SS_1(x, y)

(the "self." is redundant).

If not, could you link to or post the script/tutorial, for those of us unfamiliar with it?
 
The self is anything but redundant here... note how it stands before a method within a module - that means to be able to reference this method from outside the module (i.e. Game_Interpreter, which will be the common case here, I assume), you have to use the self addition.

Other than that, I'm not familiar with Seph's Event Spawner, so I can't really help.. what I can say is that method names should be lowercase, i.e. "ss_1" instead of what you got, and also should probably be a bit more descriptive, however that's up to your own liking since this seems like a script for your own project. Also, your indentation is wrong.
 

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