Getting aircraft to stop spawning

General discussion for CFS2 - WW 2 Pacific Theater

Getting aircraft to stop spawning

Postby Staiduk » Sun Jan 18, 2004 8:05 am

'Lo!
OK; I've got a little problem with a mission I'm building.  I'm trying to get enemy aircraft to spawn for the player's shooting pleasure; and to keep spawning every time he enters the airspace of a particular airfield.
So I set a 10nm. zone around the airfield; made enter and exit triggers for it. Enemy planes spawn no probs when I first enter; but:
Problem 1:If I set 'Abe' (the enemy) to 'Spawn'; he spawns once only even with 'Repeat when true' checked.
If I set him to 'Respawn"; he spawns as soon as his last incarnation hits the deck; even with 'repeat' unchecked.
I made sure the enter and exit triggers specified entering or leaving the area - not 'inside'; so it's a bit of a mystery what combo to use to get what I want.
But:
Problem 2: I want to have 'abe' keep spawning every time Player enters the area, until a given object is destroyed - in this case; a moving-object sub. IOW; Abe keeps attacking until player succeeds in destroying the sub, then abe stops spawning. So I created a trigger detailing 'sub, Object health greater than zero', and added it to the conditions. So Abe's spawning conditions are "Area Entered" and "Sub health".
Except the sub's health - probably caused by Problem 1 - seems to have no effect at all.
If I'm making any sense at all; does anyone know how to program the triggers/events to accomplish this? Thanx. ;)
Image
Staiduk
Major
Major
 
Posts: 1070
Joined: Thu Jan 01, 2004 8:12 am

Re: Getting aircraft to stop spawning

Postby ckur » Thu Jan 22, 2004 7:00 am

I havent tried respawn but You might try putting two or more enemy formations around the airfield. And when you have killed for example Abe the trigger would spawn the next flight. This would add the fun part that enemies could spawn from different places each time.

The triggers/events could look something like this:
trigger 1: Player inside target area.  event 1: spawn flight 1+ sub

trigger 2: sub health, trigger 3, flight 1 health

Event 2: trigger1+ flight 1 health =0 + sub health= 0 is not true, spawn next flight.

Thats just one idea, may need a bit of testing...

ckur
User avatar
ckur
Ground hog
Ground hog
 
Posts: 14
Joined: Sat Jan 10, 2004 4:36 am
Location: Pori, Finland

Re: Getting aircraft to stop spawning

Postby B24Guy » Fri Jan 23, 2004 9:38 am

Hi

ckur on the right track.

You might try something like this:

If

Player in spawn zone
"Abe" health=0
"sub" health not =0

then

Delay 10 "make sure "Abe" dead"
spawn "Bob"

Also create a trigger for "Bob"

Player in spawn zone
"Bob" health=0
"sub" health not =0

then

Delay 10 "make sure "Bob" dead"
spawn "Abe"

:D
B24Guy
2nd Lieutenant
2nd Lieutenant
 
Posts: 76
Joined: Wed Oct 01, 2003 11:03 am

Re: Getting aircraft to stop spawning

Postby Staiduk » Fri Jan 23, 2004 1:58 pm

Hi guys; thanx for the help - I'll give it a shot. I'll let you know how it works out.
:)
Image
Staiduk
Major
Major
 
Posts: 1070
Joined: Thu Jan 01, 2004 8:12 am


Return to Combat Flight Simulator 2

Who is online

Users browsing this forum: No registered users and 528 guests