M
minibigs
Guest
I've just started using GM2 today after a year or so of not using it.
GM2 updated tself to 4.3.0 20.19.15.4835 level.
As a start to re-familiarising myself I decided to write a simple tile based game & immediately hit an issue where scripts seem to fire more than once.
To investigate, I shut my Windows PC down & reloaded it so nothing is left in storage, started GM2 afresh &
wrote simlified code as follows:
Object with a create event script of 2 lines:
---------------------------------------------------------------------------------
show_message("In Create")
script_execute(TestScript())
---------------------------------------------------------------------------------
I checked only 1 instance of this object is attached to the room.
Called script TestScript:
---------------------------------------------------------------------------------
show_message("in TestScript")
---------------------------------------------------------------------------------
Resulting output is:
Message "In Create" appears in a pop up. I OK it.
Message "In TestScript" appears in a pop up. I OK it.
Now a fresh copy of the message "In TestScript" pops up.
GM2 updated tself to 4.3.0 20.19.15.4835 level.
As a start to re-familiarising myself I decided to write a simple tile based game & immediately hit an issue where scripts seem to fire more than once.
To investigate, I shut my Windows PC down & reloaded it so nothing is left in storage, started GM2 afresh &
wrote simlified code as follows:
Object with a create event script of 2 lines:
---------------------------------------------------------------------------------
show_message("In Create")
script_execute(TestScript())
---------------------------------------------------------------------------------
I checked only 1 instance of this object is attached to the room.
Called script TestScript:
---------------------------------------------------------------------------------
show_message("in TestScript")
---------------------------------------------------------------------------------
Resulting output is:
Message "In Create" appears in a pop up. I OK it.
Message "In TestScript" appears in a pop up. I OK it.
Now a fresh copy of the message "In TestScript" pops up.