How do I create an object at a specified spot


This is what should create my object, which is a sprite.
image
It has the same Z-order as a button that already exists. It doesnt show up no matter what the Z-order is as I have tried many different numbers.

There is nothing wrong with the global variable,

Please help me, /Thanks !

Are you sure the position is on screen?

I do not understand much but as I see you are changing the scene and at the same time creating an object in that scene. Therefore, you must put the conditions and actions in the final creation scene.

The order of events is also important I think?

you should show your events in both the initial and final scenes I think.

I forgot that you have to have the object to be created as a duplicate or as a “general object” in the scene where it was created

Yes, I have already tested that.


This is 1 scene, where the player makes a choice. In this case we are choosing war which sets the variable war_eco = 2 Then we go back to the Overview scene.


This is from the Overview Events Tab.
Which should be, if the Global variable war_eco = 2 then do this:
Create object X at this position.

I forgot that you have to have the object to be created as a duplicate or as a “general object” in the scene where it was created

What do you mean by this?

The object “war_Button” exist in scene “Overview” ?
You need it.

In “Overview”" you set this global variables somewhere else in this scene ?
With the debugger you can verify the value of this global variable in your game. Take a look on wiki for know how use debugger.

image
war_Button exists as an object in scene “Overview”.
It isnt placed either on the scene in case that would make a problem.


I tested the debugger and found out that it creates war_Button’s infinitely, could that be why it doesnt show up? And how do I stop it so it just creates one?
image

I seem to have fixed the infinite loop by setting it to 0.


But I still can’t see the object even though it says it has been created.

in debugger, you can now see one “war_Button”
Click on it, you can see position, layer, etc.

Have you an animation on this object ?
When you add manually the object on scene , the object is visible ?
In your event when you add the object, you have set Layer field to 3.
You have a layer with this name “3” ?
Because Layer is not Z-order, and maybe the object is correctly created but on a layer not yet created in your scene.