hide the chao behind different bushes every time.

Get help using Construct 2

Post » Sun Mar 09, 2014 2:12 am

So I'm making a sonic fan game where you're cream the rabbit and you have to find her pet chao "cheese" behind one of the bushes in each level. I was just wondering how I would make the chao end up behind a diffferent Bush each time you boot up the game. Would you use the random instance or what?
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sun Mar 09, 2014 2:49 am

This is easy. Try this:

system condition: "Pick random instance" (bush)

Chao command: "set position to another object" (bush)

Than you only need to add the move to object command.
You do not have the required permissions to view the files attached to this post.
B
10
S
2
Posts: 135
Reputation: 1,090

Post » Sun Mar 09, 2014 2:57 am

Event--->System/pick random BUSH instance
Action--->CHEESE/ (Here is where you can try a few things out that are available and see what works for you. Remember you can use an expression like BUSH.X to get the BUSH's x position and BUSH.Y to get y position.)
B
19
S
7
G
7
Posts: 88
Reputation: 4,102

Post » Sun Mar 09, 2014 3:50 am

Sounds super simple! I saw the pick random instance expression the other day and wondered when ill be using it.
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sun Mar 09, 2014 6:00 am

I just tried it and the chao ended up being behind every single Bush, not just one.
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sun Mar 09, 2014 9:56 am

It's looping cos you haven't set any restrictions on it :) Add a Trigger Once, or make it a sub-event of "On start of layout"
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Mon Mar 10, 2014 12:18 am

i've run into another problem; I also want bombs to appear if you pick the wrong bush. How do I choose random bushes with more than 1 bomb?
B
10
S
4
G
1
Posts: 159
Reputation: 1,933


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests