• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 [Request] Instance Layer Properties in Room Editor

It would be useful to be able to apply properties to a entire instance layer in the Room Editor so that anything placed on that instance layer in the future has such properties, and the layer properties can be changed at any later time too. Instance properties such as: transparency, color blending, and maybe even position, rotation, and scale would be applicable to an entire instance layers.
 
You have surfaces for that.
Yes and no. You can do it with surfaces, but it isn't always the optimal solution.

1. Surfaces can be tough to use without experience, or if you rely on D&D.
- Even as someone who uses them comfortably, they are rather cumbersome.

2. Surfaces would have more overhead - not only is it held in memory, but it has another step by drawing to two surfaces (surface+application surface). If that is technically what happens anyway, then there isn't a reason that a layer can't be treated like a surface.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
This isn't something I can see happening. Layers are generic and are only split into background, instance, tile, etc... for convenience in the room editor, when actually you can have all that on a single layer through code. So adding something like this means that it would have to affect everything on a layer, and not just instances.
 
This isn't something I can see happening. Layers are generic and are only split into background, instance, tile, etc... for convenience in the room editor, when actually you can have all that on a single layer through code. So adding something like this means that it would have to affect everything on a layer, and not just instances.
Don't we have layer ID's though?
 

Xer0botXer0

Senpai
No need to reinvent the wheel :p There are solutions to all the problems you've presented. ;)

1) Learn to use surfaces (I cover that here )
2) Set surfaces up within scripts then reference scripts
 

Mike

nobody important
GMC Elder
This isn't going to happen. This is really a runtime component, and each instance is it's own "thing". You can obviously simulate this yourself by using global variables or global arrays, and having everything on a specific layer access these, then draw themselves using it. for example...

Code:
//globals setup somewhere
enum eLayerValues{
    colour,
    alpha,
    rotation,
    scale
}

global.LayerMap = ds_map_create();
var Layer = array_create(4);
Layer[eLayerValues.colour] = c_white;
Layer[eLayerValues.alpha] = 1.0;
Layer[eLayerValues.rotation] = 0.0;
Layer[eLayerValues.scale] = 1.3;
ds_map_add(global.LayerMap, "Baddies", Layer);


//instance creation code
LayerName = "Baddies"

// instance drawing...
var Layer = global.LayerMap[? LayerName];
col = Layer[eLayerValues.colour];
|
etc
|
draw_sprite_ext(.......)
 
Top