View Issue Details

IDProjectCategoryView StatusLast Update
0031005RunnerFunctionsPublic2019-08-30 11:41
ReporterScott DunbarAssigned ToFritz 
PriorityMediumSeverityC - GeneralReproducibility100%
Status ClosedResolutionNo Change Required 
PlatformWindowsOSWindows 10OS Version
Product Version2.2.2 
Target VersionFixed in Version 
Summary0031005: Functions: Adding visible instances to a room will cause layer_tilemap_get_id() to return incorrect values
DescriptionIssue:
 Adding visible instances to a room will cause layer_tilemap_get_id() to return incorrect values

Expected:
 Adding visible instances should have no effect on tilemap layer ids
Steps To Reproduce1. Import attached project
2. Goto room0 disable visible instances on instances layer
3. Run project
4. Observe outputs displayed on the screen show correct information
5. Enable an instance on the instance layer
6. Run project
7. Observe outputs on screen are incorrect ("background" listed as a tilemap"
TagsRunner
1.4 Found In
2.x Runtime Found In
2.x Runtime Verified In9.9.1.1531

Activities

Scott Dunbar

2019-06-05 12:01

Adminstrator  

tileMapLayers.png (64,219 bytes)
tileMapLayers.png (64,219 bytes)
TilemapErorr.yyz (90,209 bytes)

Fritz

2019-07-10 12:05

Manager   ~0064391

Sample is calling layer_get_element_type with a layer index.

Replace the code in object0->Create with
for(i = 0; i< layer_count; i++){
    
    var a = layer_get_all_elements(layers[i]);
    if(array_length_1d(a)>0)
        layer_type = layer_get_element_type(a[0]);
    else
        layer_type = "Empty";

to see the proper behaviour