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.

HBGames

Hey guys, I'm trying to use an event spawning script, and I want it to spawn an event with an X and Y value of a game variable. Here's what I got:

Code:
lis = [['ABS'],['ID 8'],

['Behavior 5'],['Sight 8'],

['Sound 8'],['ClosestEnemy true'],

['HateGroup [0]'],

['Aggressiveness 3'],['Speed 4'],

['Frequency 4'],['Trigger 0'],

['Respawn 0']]

Event_Spawner::monst_abs

(x=$game_system.variables[58], 

y=$game_system.variables[59],

'SS',lis,true,1,255,false,'')

The only thing I'm having a problem with this script is the x=$game_system.variables[58] and y=$game_system.variables[59]. When I try to run the script it says "variables" is an undefined method... The error message I get is:

NoMethodError occurred while running script.
undefined method 'variables' for #<Game_System:0x39b5958

Why does it say that? And how can I fix it? Thanks for any advice.

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