• 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.

Question - Code I have a problem about the effect_create_below function

D

dougen

Guest
I create an object 'obj_circle' to draw a circle, then I used effect_create_below function that create a simple effect below the obj_circle.

In the room, I create two instance layer named 'Layer1' (depth 100) and 'Layer2' (depth 0). When I add the obj_circle to Layer2, it works fine. But add the obj_circle to the Layer1,the effect was above the obj_circle.

Can anyone told me why?

snipaste_20170519_004023.png

TIM图片20170519004035.png
 
I noticed this before and have logged a bug for this one.

I was doing some testing and found that effect_create_below() only seems to create the effect below objects of depth 50 or less. If the object depth >= 50, the effect actually appears above it.

I also checked out effect_create_above() and it seems the effect is generated on layer/depth -15000. so if you object depth is < -15000, the effect will appear below it.
 
D

dougen

Guest
I noticed this before and have logged a bug for this one.

I was doing some testing and found that effect_create_below() only seems to create the effect below objects of depth 50 or less. If the object depth >= 50, the effect actually appears above it.

I also checked out effect_create_above() and it seems the effect is generated on layer/depth -15000. so if you object depth is < -15000, the effect will appear below it.
So the description of the two functions on the document is wrong?
 
I wouldn't say wrong, I'd say the docs are "out-of-sync" with GMS 2 functionality. It was probably true for GMS 1 but I haven't checked to confirm.

So that, combined with the bug does make the docs incorrect.

I think I let them know in the bug report, plus I let @Nocturne who does the documentation know about it also. I believe it will be updated sometime in the near future.
 
D

dougen

Guest
I wouldn't say wrong, I'd say the docs are "out-of-sync" with GMS 2 functionality. It was probably true for GMS 1 but I haven't checked to confirm.

So that, combined with the bug does make the docs incorrect.

I think I let them know in the bug report, plus I let @Nocturne who does the documentation know about it also. I believe it will be updated sometime in the near future.
Thanks :)
 
Top