Page 1 of 1

Multiple Enemies

Posted: Tue Jun 03, 2008 2:23 am
by Mouzi
See the example level Multiple Enemies (it has infinite lives because it's just an example).

I bet someone has better use for this than I do :P I'm not that good with action levels.

Here's the designing code for it:

Code: Select all

AI code

AI_makeTrigger,death,rotatePart,6,1,5,0,0,90
AI_makeTrigger,death,rotatePart,6,1,-5,85,0,90
AI_makeTrigger,death,rotatePart,7,1,5,0,0,180
AI_makeTrigger,death,rotatePart,7,1,-5,85,0,180
AI_makeTrigger,death,rotatePart,8,1,5,0,0,270
AI_makeTrigger,death,rotatePart,8,1,-5,85,0,270


Part code

core, 400, 300, 0, 1, 1, -1, 0, 0066FF
rect, -145, 175, 0, 1, 1, e0, 8, 0066FF
rect, -292, 8, 0, 1, 1, e0, 7, 0066FF
rect, -291, 170, 0, 1, 1, e0, 6, 0066FF
c, 0, -100, 0, 1, 1, e0, 1, 0066FF
c, 100, 0, 0, 1, 1, e1, 5, FFFF00
c, 0, 100, 0, 1, 1, e1, 4, FF0000
c, 0, -100, 0, 1, 1, e1, 3, 0000FF
c, -100, 0, 0, 1, 1, e1, 2, 00FF00
The squares are a way to skip to next enemy easily when designing.
You have to change the -100 and 100 in the five Plain circle parts to for example -1000 and 1000 when you want to finish it.

Discuss :)

Posted: Tue Jun 03, 2008 9:52 am
by swartzer
Once again, Mouzi with the cool new technique! This is pretty slick.

Posted: Tue Jun 03, 2008 11:11 am
by Sasadad
Whoa. I don't get how you did it, but that is amazing. Probably the coolest thing I've seen yet on ZF. :)

Posted: Tue Jun 03, 2008 11:50 am
by Mouzi
I did it with the new deathTrigger: rotatePart.
When one enemy dies a new one rotates into view and starts shooting.

I've been thinking about something like this before and I think I've posted about it too, but it probably wasn't possible before now.

EDIT: Found it
Mouzi wrote:Some cool uses for this would be for example a survival level where you have to survive for something like 1-2 minutes and then the level would change. Or then I had an idea about a level with maybe 3 different ships where only one of them is visible and then the visible one would change with certain interval.
There was some discussion about it in this thread too.

Posted: Wed Jun 04, 2008 6:18 am
by Sasadad
How does the new ship rotate to exactly where the old one was? Are they all attached to a core in the center that is randomrotating and randomwaypoint-ing?

Posted: Wed Jun 04, 2008 7:40 am
by Mouzi
The enemies are attached to a circle and rotate around it and that circle is attached to the core.

Did you try the code I posted? It should explain it a bit as it is a small scale version of the level (before you change the -100 and 100 to -1000 and 1000).

Posted: Wed Jun 04, 2008 12:14 pm
by swartzer
You could probably accomplish the same effect by locating the core off the top of the screen and the multiple enemies in a wide circle around it. Every time an enemy is destroyed, the core would rotate to bring a new enemy into the exact center of the screen. The last enemy, instead of having a rotation trigger when destroyed, would have a destruction trigger to blow up the core and end the level.

Posted: Wed Jun 04, 2008 12:16 pm
by Mouzi
Yeah, but then you can't make it move/rotate randomly or follow ship.

That's why I put the circle as the center and not the core.

It still looks exactly the same so why not? :P

(Actually I made it first that way, with the core off screen, but then I realised
I couldn't put randomWaypoints nor randomRotate on it so I had to make a workaround.)

Posted: Thu Jun 05, 2008 11:10 am
by swartzer
Good point! I hadn't thought of the effect my version would have on boss movement.

Posted: Thu Jun 05, 2008 12:19 pm
by Sasadad
Ok, cool. So now I get how it works perfectly. Would you mind if I made a level based on this, Mouzi?

Posted: Thu Jun 05, 2008 12:38 pm
by Mouzi
Sasadad wrote:Would you mind if I made a level based on this, Mouzi?
No. That's why I posted the code; for others to use in their levels :)