Help with a simple bubble popping game.
Hi, I'm trying to make a personalised ipad game for my nephew who has developmental issues. It's a very simple bubble spawn and pop game on a single scene. I'm a complete newb when it comes to this, but I've been working through with a mix of watching the tutorials and trial and error, unsurprisingly I've got stuck.
What I've got so far: I have a actor set up that, when touched, spawns bubbles. I followed the 'spawn random actor' vid and added a timer set up to randomise what kind of bubble/actor spawns. This doesn't always work, sometimes you press the trigger actor, the sound plays but nothing is spawned. I then tried changing it from spawning one actor to variants of multiple actors, just by adding multiple 'spawn actors' to the rule. So if varient = 1 it should spawn 3 actors. It now doesn't spawn anything.
I've also added a timer which gives a variable random size when the bubble spawns. Unfortunately it doesn't constrain proportions and gives me elliptical bubbles as well as round ones.
What I want to do: When the trigger is pressed, I would like it to spawn random bubbles/actors, and a random number of bubbles between 1-4.
I would also like to randomise the size they grow to when spawned, whilst constraining proportions.
Any help, or links to relevant tutorials, would be most gratefully received.
thanks in advance, Okem.
What I've got so far: I have a actor set up that, when touched, spawns bubbles. I followed the 'spawn random actor' vid and added a timer set up to randomise what kind of bubble/actor spawns. This doesn't always work, sometimes you press the trigger actor, the sound plays but nothing is spawned. I then tried changing it from spawning one actor to variants of multiple actors, just by adding multiple 'spawn actors' to the rule. So if varient = 1 it should spawn 3 actors. It now doesn't spawn anything.
I've also added a timer which gives a variable random size when the bubble spawns. Unfortunately it doesn't constrain proportions and gives me elliptical bubbles as well as round ones.
What I want to do: When the trigger is pressed, I would like it to spawn random bubbles/actors, and a random number of bubbles between 1-4.
I would also like to randomise the size they grow to when spawned, whilst constraining proportions.
Any help, or links to relevant tutorials, would be most gratefully received.
thanks in advance, Okem.
Comments
Here's a link to GSHelper's tutorial on spawning actors with randomized behaviour, there's plenty more good tutorials to go through, hope this helps:
That GSHelper tutorial is the one I followed to create the function of random spawning actors. I then put the results of that in a rule that triggers it when touched. Only it's temperamental and doesn't spawn with every touch like it should.
Edit: Ok. I fixed the random spawning issue. Now I just need to work out how to randomise size whilst constraining proportions, and randomise the number of actors spawned.
I've created a way to randomise size whilst constraining proportions by creating a randomising atribute then setting size rules for 3 alternates.
It changes the size and constrain proportions, but unfortunately it does not do it just once when the actor is spawned, but repeatedly until actor is destroyed. So my actors jump from one size to another.
How do I set it to only take effect once, when the actor is spawned?
thanks for reading.
Okem.
It's hard to troubleshoot an issue without knowing if you are using Change Size, Change Attribute, Interpolate, etc., and then are you interpolating the width only, or the width and height, and if so, what rule/condition is that in? etc.
Ok here is a screen cap of my group for randomising size.
I created an attribute called "random size" and set it to randomise between 1-3. I then attached 3 rules, you can only see one as I could not fit any more in the cap, but the others are identical, rule 2 sets the size to 100, 3 to 150.
With this on, it changes the size whilst constraining proportions as I want, but it changes size multiple times. I only want it to randomise the size change once, when the the actor is spawned.
When pressed it plays sound and randomly spawns one of 7 actors. You can see the random 'change attribute' 1-7, and #1 of the rules (again the others are identical apart from the variables, = 2, actor: Lorry, etc)
This works well. But I would ideally like to find a way to make it spawn multiple actors, and have this randomised.
I guess I could do this by just putting random groups of 'spawn actor' in each rule. But wondered if there was a better way to do this, that would make it actually random rather than preset random groups that would inevitably repeat.
The group/rule will still change the size of any actor already in the scene, if a new actor of the same type is spawned. But I think I can live with that, as it isn't a massive issue.*
thanks again for helping me work through this. It's a great little app.
*edit: I figured out I could stop this from happening by putting the randomise size group in a short timer.