Home   Help Search Login Register  

Author Topic: Enemy respawn  (Read 1908 times)

0 Members and 1 Guest are viewing this topic.

whiplash2000a

  • Guest
Enemy respawn
« on: 14 Aug 2003, 17:58:20 »
This little mission, which I did not take the time to polish up, has within it several scripts. Most of which I did not make myself, but proper credit is given in the documentation.

The mission features a small squad of west JAM_Units(the ones from BAS's blackhawk pack, yes you need to have them to use this). Your squad is walking along and it is attacked by 5 enemy units. Once there are only two enemy units left, 4 or 5 more spawn a little bit away from you position. This allows for extended firefights, but also will not lag your cpu down by having 80+ units on the battlefield at one time. The way it is set up now, the firefight will last forever, however, if one were to add a counter to the script the mission could last as long as you wanted it to, and discontinue the respawning at a certain time.

I must take the time now to give a bit of credit to CrashnBurn, we worked on respawning units roughly a year ago. Apperently he created a script using the creatunit command, which is a simpler way of doing things, sort of.

I am sure you guys can come up with some cool uses for this script. There are infinite possibilities with this. It would not be difficult to create any kind of unit on the fly.

whiplash2000a

  • Guest
Re:Enemy respawn(update)
« Reply #1 on: 14 Aug 2003, 22:24:40 »
Here is an updated version of the mission with the script. It now contains victory conditions, two respawn points for different squads and more men on your side. You still need to have the BAS Jam_men for this to work. I highly recommend them for the fact that they incorporated dispersion fire, which prolongs fire fights, and does indeed add atmosphere.

This little mission includes a lot of code that a lot of people have been asking questions about, spawning, counters, grouping... and a bunch of other stuff. I know I will be using this mission as a reference for further mission making.

whiplash2000a

  • Guest
Re:Enemy respawn
« Reply #2 on: 15 Aug 2003, 03:55:47 »
I don't know why this was moved. It doesn't need beta testing. It is an advanced script, thusly I put it in advanced scripting.

Offline Noon416

  • Old Bugger
  • Former Staff
  • ****
Re:Enemy respawn
« Reply #3 on: 15 Aug 2003, 04:13:36 »
It would have been moved due to the references you make always being about the mission, not script development.

I would suggest starting a new thread in the Advanced Scripting area, and this time refer to the "script and its development", instead of the "mission and its development" (which is what Mission Beta-Testing is for).

Hope this helps. :)
"If a man talks in the woods and no woman hears him, is he still wrong?"

whiplash2000a

  • Guest
Re:Enemy respawn
« Reply #4 on: 15 Aug 2003, 07:58:47 »
Oh.

Well, at any rate it is now on the forums for ppl to use, which was my original intention.

Hope this helps the people who were looking to spawn vehicles, units, entire squads.

Here is another little "mission" / example of how to respawn stuff, except this time it is a vehicle and we can now keep track of whether or not it is alive. This was sent to me by CrashnBurn a year ago, not sure if he posted it anywhere or not. But it is pretty cool.

On a side note, I am providing this information because I believe I have seen too many missions where there have been far to many units placed on the map as soon as the mission begins. I have a really fast pc, but I like to see my ofp run extremely smoothly and I think everyone else can agree with me.

I remember when I first got into editing and making missions, I went to download some other missions and there was this beach invasion mission. As soon as it started, the game became a slide show, not cool.

Anyway, have fun. Long Live OFP!!!!!
« Last Edit: 15 Aug 2003, 08:07:46 by whiplash2000a »

rockwelder

  • Guest
Re:Enemy respawn
« Reply #5 on: 15 Aug 2003, 19:32:59 »
With  version2 how do you keep the respawn happening? it seems to stop after 3-4 respawns.

thanks.

whiplash2000a

  • Guest
Re:Enemy respawn
« Reply #6 on: 15 Aug 2003, 22:49:34 »
The variable "Coun" keeps track of the number of respawns. "War.sqs" increases the number. Once it has reached 3 the respawning stops. That part is easy to change, just look at the triggers in the mission editor and change this line of code:

?(Coun > 2): goto"end" <---- this is in war.sqs

If you are going to try an modify it a bit, don't use the variable "Count" as that is already in use somewhere else. There is also a trigger in the mission itself that checks the vaiable "Coun", I don't remember what trigger it is, but the mission isn't all that complicated.
« Last Edit: 15 Aug 2003, 22:52:36 by whiplash2000a »