Discuss and collaborate on GML scripts

You are not logged in.

#1 2009-07-04 13:45:13

Registered: 2008-12-11
Posts: 72

instance_deactivate_* - bugs when deactivating self in start events

Brief Description:            instance_deactivate_* - bugs occur when deactivating yourself in the creation/room start event
GM Versions:                   GM6, GM7
References:                     [1]
Example File:                   instance_deactivate start events bug.gmk
Bug Confirmed:                Yes
Hardware Dependent:     No

Main Info:

When you deactivate yourself in the creation event a bug occurs which makes a subsequent instance creation event not occur. The same problem occurs in the room start event except some people have also reported that the game crashes when doing this in the room start event. As shown in the example file the bug does not exist when setting an alarm to 1 and deactivating.

If you make a test of putting instance_activate_object(object0); in block0's creation event you will see that object0's creation event will actually get executed again (you can test this by adding a show_message or looking at the number of controller objects created). This means that the bug is causing the internal event list queue to go wrong and change one of the block's creation events to object0's creation event instead when it gets deactivated. I think the underlying cause of this bug is likely to be the same bug found in the other deactivation bug topic:


Deactivate in an alarm instead of creation/room start event as shown in the example file.


Board footer

Powered by FluxBB