Random Fireball

Get help using Construct 2

Post » Sun Sep 11, 2011 1:32 pm

HOW.......

Do I have a few random fireballs starting from the right of my screen wiz across my platform at random heights, maybe hitting my player on his platform from time to time.

Many Thanks
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Sun Sep 11, 2011 2:00 pm

You want to spawn fireballs from right side of the screen at random height position? Is that what you trying to do?
ImageImageImageImage
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Sun Sep 11, 2011 11:21 pm

yes please.
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Mon Sep 12, 2011 5:23 am

[QUOTE=ozziedave] HOW.......

Do I have a few random fireballs starting from the right of my screen wiz across my platform at random heights, maybe hitting my player on his platform from time to time.

Many Thanks[/QUOTE]

I'm doing this tutorial now:
http://www.scirra.com/tutorials/37/beginners-guide-to-construct-2

I'm at the part where it talks about spawning monsters etc. I think it might be helpful with what you need. instead of monsters, you can spawn the fireballs.
B
19
S
8
G
8
Posts: 120
Reputation: 6,217

Post » Mon Sep 12, 2011 5:25 am

B
19
S
8
G
8
Posts: 120
Reputation: 6,217

Post » Tue Sep 13, 2011 4:01 am

Thanks Ghengis,

As you suggested, this is the code that worked for me.

LASERBALL IS A SPRITE

System | on start of layout | LASERBALL | set angle to 360dg

LASERBALL | is outside layout | LASERBALL set angle toward ( player.X, player.Y)

System every 8 secs | System | create object LASERBALL on layer | at (1500,(Random(1024)))

Cheers
B
4
S
1
G
2
Posts: 45
Reputation: 1,365

Post » Tue Sep 13, 2011 4:12 am

I did the same technique except I placed my event from a button click. The beginner tutorial is a must read. It was really helpful.
B
19
S
8
G
8
Posts: 120
Reputation: 6,217


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests