Home   Help Search Login Register  

Author Topic: AI Respawn for Single Player...possible?  (Read 755 times)

0 Members and 1 Guest are viewing this topic.

Chaos_Creator

  • Guest
AI Respawn for Single Player...possible?
« on: 05 Nov 2002, 07:20:11 »
Call me a sadist, but I am looking to respawn AI troops and vehicles in single player mode.

Why?  ???

I like large battles, but when I have a large number of AI units (200+) in the game (even 50% standing by, out of view) it causes performance to go into the toilet (on my AMD 1.4, 512 Ram, 128 Vid). My idea is to create the illusion of enemy waves using a script. Each wave would be like 50-60 units, and after they are destroyed they "respawn" at the enemy base and attack the good guys again.

This script could be programmed to run for a specific number of waves, so it wouldn't run forever, however that would be fun too. Sadist warning.

What would be even cooler is if the bodies could stay around and the units still reappear, although I'm unsure how OFP would handle the bodies...do they count against the maximum unit #?

Is this possible? Has this been done? I've seen lots of stuff about multiplayer respawning, but nothing on single player. I'm not a scripter/programmer type, so I would certainly appreciate any help offered.

Thanks.

Hamdinger

  • Guest
Re:AI Respawn for Single Player...possible?
« Reply #1 on: 06 Nov 2002, 01:28:26 »
I've actually created a mission similar to this.  It's meant for multiplayer but it should work in single-player as well, the major difference being that the player wouldn't be able to respawn.  I don't have it here with me, but I could post it later tonight.

The basic idea of my mission is that you're defending a building from successive waves of soldiers and tanks.  Each wave is harder than the last (up to a point).  The number of waves is infinite, though you could change that easily.  I've thought about submitting it as a snippet, but I didn't think anyone would be interested in it.

As for the dead bodies, I leave them around.  I don't know if there is a limit to how many you can have, but having tons of dead bodies definitely slows down a multiplayer game after a while.  I've been meaning to add a script to clear some of the dead bodies from time to time but just haven't gotten around to it yet.

HuNtEr-exz

  • Guest
Re:AI Respawn for Single Player...possible?
« Reply #2 on: 06 Nov 2002, 12:52:59 »
well u could create a game logic then have a script which checks if the guy is alive something like

!(alive man): man setpos [getPos thingy], man setdammage 0;

and so on... well ne way  its late at night here and im really tired dont nkow if it will work though

Hamdinger

  • Guest
Re:AI Respawn for Single Player...possible?
« Reply #3 on: 08 Nov 2002, 08:14:26 »
Here's the mission I was talking about.  It's gotten a lot of play time on my LAN.  It's not documented that well, but I'm more than willing to answer any questions about it.
« Last Edit: 08 Nov 2002, 08:15:01 by Hamdinger »

Chaos_Creator

  • Guest
Re:AI Respawn for Single Player...possible?
« Reply #4 on: 10 Nov 2002, 06:46:04 »
Thank You Very Much... Finally...I have gotten into playing a mission rather then sitting back and watching a bunch of AI idiots class like a big game of chess. This is one cool ass script. I played for hours...in single player mode. I tried to follow the logic of the script, but it was beyond me.

I did get that nato troop strength determined the amount of soviet soldiers attacking, which was cool.

Thanks so much. Now I can fulfill my sadistic need to blow em away!!!