random fire, and a group action

Get help using Construct 2

Post » Fri Dec 13, 2013 3:31 am

I'd like the enemy to be able to have 1/200 chance or something of firing

And if the enemy hits the wall, I want the whole group to go down, not just one of them.

How do I do this?
B
12
S
3
Posts: 88
Reputation: 1,564

Post » Fri Dec 13, 2013 8:08 am

Your questions aren't really very clear, but this might help you:

- give the enemy a variable shootingchance

for each enemy
-enemy set shootingchance : floor(random(201))
subevent:
enemy compare variable shootingchance = 200
-enemy shoot

if enemy hits wall
pick all enemies - perform action.

LittleStain2013-12-13 08:09:21
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 17, 2013 2:38 am

Thank you for your help.
The movement itself kind of worked, with fewer enemies.
To be less confusing, I'm simply making a space invaders game. And my goal is to make them move down their traditional way, and firing their traditional way too.
B
12
S
3
Posts: 88
Reputation: 1,564


Return to How do I....?

Who is online

Users browsing this forum: Mayfly and 14 guests