Hi! I’m trying to make a little proto-type game and there is a feature that’s confusing me I’m trying to implement.
So you have one Scene we’ll call it Scene A - you have a player character and they can pick up flowers. In Scene B I want that exact amount of flowers I picked up to be spawned as bigger flowers to use drag and drop for flower arrangements.
What I can’t seem to figure out is how to get the exact number of flowers to spawn.
I either get nothing, infinite, or one.
My thought process is you reference the number in the global variable (I used a global variable to count the flowers so I could use it in multiple scenes) and then spawn the number of flowers as the global variable…because that has the number? I don’t know if that made sense.
The best way would be to use global variables instead of scene variables in scene A whenever the player collides with a flower. These can then be accessed in scene B.
Also, if flower_pickup_1 and flower_pickup_2 are in flowers group, deleted the flower group after you’ve checked for collision with flower_pickup_1 & flower_pickup_2.
Use a Repeat event, with the global variable as the number of iterations, and the create flower as the action.
Nothing Spawned. I wasn’t sure if I was supposed to do something in “Scene A” too?
I removed the “Delete” entirely and still nothing spawned, I thought that might have been the problem. So I put it back because the number rises too rapidly without it.
Thanks!
Edit: Here’s a link to the project maybe I’m not mentioning something important and don’t know it LOL
Yes, you’ll need to add a condition to the spawning event so it only happens once - maybe make it a sub event of an event with the “Beginning of scene” condition.