Home   Help Search Login Register  

Author Topic: Respawning enemy groups  (Read 1516 times)

0 Members and 1 Guest are viewing this topic.

Father.Jack

  • Guest
Respawning enemy groups
« on: 24 Apr 2004, 11:29:57 »
Hi im trying to figure out how to spawn enemy groups that will immediately respawn to a designated area when they have been wiped out. Can i have a few examples to work on please, including the mao coordinates for where the enemies will respan again. Thx ;D

OH AND BTW I HAVE SEARCHED AND IT COMES UP WITH COMPLICTED CRAP :)
« Last Edit: 24 Apr 2004, 12:32:35 by Father.Jack »

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Respawning enemy groups
« Reply #1 on: 24 Apr 2004, 13:11:07 »
Try this:
make a marker where you want them to respawn, named whatever you like, I'll use "here" for this example
make a trigger covering the mission area, activated by enemyside not present repeatedly
on activation [] exec "needmore.sqs"

then in a script called needmore.sqs
"unit type" createunit [getmarkerpos "here", groupalpha]

repeat that line as many times as required

at the marker area put a trigger activated by the enemy side present repeatedly
on activation [groupalpha,1] setwpppos getmarkerpos "gohere"

make another marker where you want them to go and name it gohere

that should work for you, haven't tried it, all off the top of my head.  good luck!

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #2 on: 02 May 2004, 18:24:13 »
Thanks, but what for example do i put in the unit type bit?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning enemy groups
« Reply #3 on: 02 May 2004, 18:33:52 »
'unit type' will be the type of soldier you require.



Planck
I know a little about a lot, and a lot about a little.

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #4 on: 02 May 2004, 18:37:41 »
Yeah i know that but i need an exaple of what to put in its place coz i cant put a simple "soldier". Im new so i have no idea what to put. ALSO , should i include the quotes?
« Last Edit: 02 May 2004, 18:48:08 by Father.Jack »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning enemy groups
« Reply #5 on: 02 May 2004, 18:50:17 »
Hmmm.......ok......try some of these:


"SoldierEB"
"SoldierEG"
"SoldierEMedic"
"SoldierEMG"
"SoldierELAW"
"SoldierEAT"
"SoldierEAA"
"OfficerE"
"OfficerENight"

Presuming you want east soldiers



Planck
« Last Edit: 02 May 2004, 18:51:10 by Planck »
I know a little about a lot, and a lot about a little.

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #6 on: 02 May 2004, 19:01:56 »
Hmm i tried it and it doesn't work. Can you check the script above to see if there are any faults. Does it work in map editor preview?

and does the marker have to be a specific type?
« Last Edit: 02 May 2004, 19:03:15 by Father.Jack »

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #7 on: 02 May 2004, 19:17:21 »
HELP!! ^^^^  ;D

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning enemy groups
« Reply #8 on: 02 May 2004, 19:37:13 »
Yes it all works,,,,,,however there is a syntax error in this line:

[groupalpha,1] setwpppos getmarkerpos "gohere"

It should read:

[groupalpha,1] setwppos getmarkerpos "gohere"


Planck
I know a little about a lot, and a lot about a little.

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #9 on: 02 May 2004, 19:46:17 »
Yeah i saw that but it still doesnt work for me. Any ideas?

BTW WHAT TYPE OF MARKER SHOULD I USE?
« Last Edit: 02 May 2004, 19:51:39 by Father.Jack »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning enemy groups
« Reply #10 on: 02 May 2004, 19:52:07 »
One little thing......you need groupalpha to already exist.

What I did with my little test mission was:

I put down one east soldier and made him groupalpha with this in his init line:

groupalpha = group this

Make sure he is inside the area of the trigger that detects enemy NOT present.

Then I shot him dead.

This started the respawn of the rest of the soldiers.

Who then shot me dead

ANY MARKER YOU WANT.....btw


Planck
« Last Edit: 02 May 2004, 19:52:50 by Planck »
I know a little about a lot, and a lot about a little.

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #11 on: 02 May 2004, 19:59:11 »
Thats brilliant! Thanks alot mate  ;D. Just needed to have grp alpha like ya said. Thanks again

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #12 on: 02 May 2004, 20:17:50 »
Ahh damn! These guys only respawn 2 times and then they never return :( how do i fix that?

+

They refuse to move to the 'gohere' marker
« Last Edit: 02 May 2004, 20:33:28 by Father.Jack »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Respawning enemy groups
« Reply #13 on: 02 May 2004, 20:48:38 »
No NO NO........they just keep coming here...........there are thousands of bodies piling up here.

In fact it is getting hard to hit them now because of the dead bodies in the way.


Planck
I know a little about a lot, and a lot about a little.

Father.Jack

  • Guest
Re:Respawning enemy groups
« Reply #14 on: 02 May 2004, 20:54:15 »
Thats weird, for some reason the repeat thing on the trigger only works a few times  >:(