(Solved) Trying to create an boject but not working

Okay so i am using these events

I just don’t get it where it is going wrong it just doesn’t creates the object but if i remove the saplingcount part it works.

Create it at X 1 Y 1
To see if it even creates there
IF not then try to remove conditions and add key pressed to spawn it on demand
To just test what is working and what is not
Also maybe problem is in Z order or layer?

Change Z order to 100 or layer to higher one on the list?
Try that

Okay i tried that but not working
I noticed two things

  1. If i remove the sapling count it does creates the object
  2. and if i add the sapling count it adds in the variable and the counter shows that but it doesn’t subtracts so i guess it is the problem?

Hahah i just noticed

When oi checked your events i was checking if you set correct names and you did BigBoiSapling is correct in both events

What is not

In top one you have global variable
In bottom in condition and action you have object variable

Lol i have been going through the events since yesterday but wasn’t able to notice
but still facing one problem it is not subtracting the variable i have tried both global and object variable

Maybe the “equal or greater” (in the bigboisaplingcount) is the problem, some sort of delete & create loop. Try to change it to “greater” only
Just a shot from me…

I changed it to greater than so now what happens is if i have 1 BigBoiSaplingCount i can place 1 only but it doesn’t subtracts it

and if you place it on the layout, doesnt trigger it a new collision instant?

If you mean that player can collide or not yes the player can collide

I haven’t worked with this SelectTool yet. So I’m really just guessing.

My thought goes along the lines that if you have an event that adds something to you via collision and you have a second event, for example to plant something. Then you might be standing so close to the object that you basically collect it again straight away and have a problem.

Could it be?

I thought about it and no it won’t happen because the object i am collecting and the object i am placing are two different objects

mmh okay, maybe post more from code again, otherwise - no ideas left at the moment

Even i don’t know what to post because everything i have related to that i have posted it but i will post again

Now you should check if this variable is displaying in text correct value

And does it go 1 before creating new sapling

it displays properly it adds 1 2 etc but doesn’t subtracts

Open Debugger and watch live, if the global var really dont change.

and your change text, it will ONLY trigger if you are in collision. but NOT if you press q, cause there is no action for it

Before getting the BIGBOISAPLING

After getting the BIGBOISAPLING

Global Variables should found here and not under instances, at least in my case


by the way, in the screenshot before the last one above, you are showing the variables of the object, and not from the global ones.

Solved it all it was missing was a txt modify event XD
Thank you for your time !

1 Like