I’m trying to create objects that will be created with numbers on them in ascending order
What I would like to do is
When I press a button, an object is created at position X 100; Y 100 with the number 1 on it. I can then drag It into a different position. When I click the button again, another object is created with the number 2 on it, which can be dragged into position and so on up to number 99. Is there a better way of doing this, rather than creating 99 separate objects?
Number where exactly? The name of the object or the text if it is a Text Object?
I’m assuming you mean an Object Variable, right?
I think a good way to do this would be:
For every instance of NewObject:
If variable "Number" of NewObject = 0
do = Variable(Count) to variable "Number" of NewObject.
Do = Count(NewObject) + 1 to scene variable "Count".
That way, for every single instance of NewObject in the scene, if it hasn’t been assigned a number yet (aka a value in its “Number” variable), it’ll be assigned the value in the scene variable “Count”.
And the value of Count will be the number of objects currently in the scene, plus 1. So, if you have 99 objects, the value of Count will be 99 +1 = 100, and next time you make an object, the value of its Number variable will be 100.
I don’t know if that would glitch depending on how many objects you create at once, but it’s worked well so far for me at least!
Also, if it ends up glitching and giving the wrong number or repeating numbers, you can try adding the “Trigger Once” condition and seeing if it solves it. I don’t know if it’ll work, though.
I think this is exactly what I am after. However I am very new to this and struggling to fully get to grips with it. Would you be able to expand on it or provide a screen shot of an Events screen with it working?
I know its a lot to ask so fully understand if you can.
I’ve managed to get it working. Exactly what I wanted,
Thank you for your help.