Multiple imagepoint

Get help using Construct 2

Post » Fri Apr 20, 2012 1:59 am

Hi guys ,

First i'm noob, i've began with cc2 for 1 week. I really wanna shoot one bullet from different random place on left button in mouse.

Like for first click the bullet come from left and for the second it come from right, that's look so easy.

I created a event mousse
"on left button clicked" with action on my background where i set 4 different imagepoint.

Then "spawn "bullet" on layer 8 int(random(0,balls.Bullet.AngleOfMotion))

Then obvusly "set angletoward(Mouse.X,Mouse.Y)

Anyone have an idea about that ? ^^

Thanks.
B
4
Posts: 6
Reputation: 967

Post » Fri Apr 20, 2012 3:44 am

You should post your capx.

On bullet spawn though, you should have an "imagepoint" field in which you can use int(random(0,3)) (since you have 4 imagepoints, it will pick one of the four imagepoints).
Kyatric2012-04-20 03:45:10
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
263
S
93
G
56
Posts: 7,180
Reputation: 67,654


Return to How do I....?

Who is online

Users browsing this forum: LaurenceBedford, Tackla and 6 guests