No more enemies after explosion...

Talk about making games.

No more enemies after explosion...

Postby StarFishDesign » Mon Dec 05, 2005 2:22 am

I also did one enemy in my game which is flying it's path in an infinite loop from the top to the bottom of the screen.

I told the laser of the players spacecraft to destroy the enemy sprite and show an explosion anim instead. But afterwards the loop with the enemy spacecraft won't continue. Only the players spacecraft on the screen - no enemy. Any idea?
User avatar
StarFishDesign
 
Posts: 39
Joined: Sun Dec 04, 2005 7:27 pm
Location: Austria
Score: 0 Give a positive score

Postby makslane » Mon Dec 05, 2005 12:13 pm

How you are destroying the enemies?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby StarFishDesign » Mon Dec 05, 2005 12:17 pm

Enemy1 = Enemy
Starship_Shot = Laserbeam

If the laserbeam hits the enemy on any side > DestroyActor "Enemy" and CreateActor "Explosion" (which is a small GIF animation).

That's it.
User avatar
StarFishDesign
 
Posts: 39
Joined: Sun Dec 04, 2005 7:27 pm
Location: Austria
Score: 0 Give a positive score

Postby makslane » Mon Dec 05, 2005 12:53 pm

This will destroy all enemies.
Use: DestroyActor("Collide Actor") to destroy only the correct enemie.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby StarFishDesign » Mon Dec 05, 2005 1:33 pm

Yes, the enemy is destroyed then. But after that no other enemies will appear...
User avatar
StarFishDesign
 
Posts: 39
Joined: Sun Dec 04, 2005 7:27 pm
Location: Austria
Score: 0 Give a positive score

Postby makslane » Mon Dec 05, 2005 4:18 pm

What's happen after the DestroyActor("Collide Actor") action?
How you create other enemies?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest