View Issue Details

IDProjectCategoryView StatusLast Update
0027963RunnerVariablesPublic2018-02-07 17:14
ReporterStewart BishopAssigned ToSam Cumming 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
Product Version 
Target VersionFixed in Version 
Summary0027963: Variables: [GMS2] layer gets set to -1 when changing room for persistent objects
Description Persistent object's layers are stuck on "-1" upon re-entering their original rooms.

When persistent objects arrive in a new room they're layers are set to -1, which is troublesome, but to get around it you can manually set the layer in code. Although all code affecting the layer is overwritten to "-1" when they return to the room they spawned in.

I have attached a project that switches between rooms on key press and attempts to overwrite "-1".

Layer's being set and forced to -1 causes all instance_create_layer(layer) lines unusable and having to manually set the layer when each room has an identical layers is already problematic.
Steps To Reproduce1) Import project
2) Run project
3) Press space a few times
4) See that this works
5) Open the objects room start event
6) Comment out the line setting layer
7) Run the project again and see that once space is pressed the layer functions no longer work
1.4 Found In
2.x Runtime Found In2.1.0.144
2.x Runtime Verified In2.1.1.1


Stewart Bishop

2017-10-03 12:30


LayerBug.yyz (16,476 bytes)

Daniel Cleaton

2017-10-04 09:15

Adminstrator   ~0055894

Shouldn't this all be fixed in 2.1.1?