OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Father.Jack 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 :)
-
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!
-
Thanks, but what for example do i put in the unit type bit?
-
'unit type' will be the type of soldier you require.
Planck
-
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?
-
Hmmm.......ok......try some of these:
"SoldierEB"
"SoldierEG"
"SoldierEMedic"
"SoldierEMG"
"SoldierELAW"
"SoldierEAT"
"SoldierEAA"
"OfficerE"
"OfficerENight"
Presuming you want east soldiers
Planck
-
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?
-
HELP!! ^^^^ ;D
-
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
-
Yeah i saw that but it still doesnt work for me. Any ideas?
BTW WHAT TYPE OF MARKER SHOULD I USE?
-
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
-
Thats brilliant! Thanks alot mate ;D. Just needed to have grp alpha like ya said. Thanks again
-
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
-
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
-
Thats weird, for some reason the repeat thing on the trigger only works a few times >:(
-
Try this little test mission.
Set on Intro.
Planck
-
Thx, even with your mission they will respawn a few times then they would never return. What patch do you have btw?
-
does anyone know? :-[
-
Check this out, mate: http://www.ofpec.com/editors/resource_view.php?id=585 (http://www.ofpec.com/editors/resource_view.php?id=585)
Requires Resistance with 1.91
-
My game is fully patched to 1.96.
The mission I posted:
I can play this for ages..........and they just keep respawning.
The place gets littered with bodies.
Of course, they always get me in the end, when I run out of ammo.
I have no idea why they don't continue to respawn for you.
Planck