OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Mr.Peanut on 28 Sep 2005, 15:51:41

Title: mission idea - need input
Post by: Mr.Peanut on 28 Sep 2005, 15:51:41
I am working on a coop mission for 20-30 players in which the objective is to protect an AI driven convoy until it reaches its destination.  The convoy will have a time limit. I realise that due to AI driving abilities, the convoy route will have to be the same each game, set with many waypoints steering it around.

In coop mission design, one of the biggest problems is accounting for all the ways players will try to screw up your mission.  For example, in the convoy mission, players could kill all the convoy drivers and then take an enemy free route to their destination.  I do not want to end the mission simply because the AI drivers die, but I am stumped on how to keep players en route yet still provide some sense of freedom.

Any suggestions?
Title: Re:mission idea - need input
Post by: macguba on 28 Sep 2005, 16:00:39
Add EHs "killed" to the drivers.  If more than two of them get killed by their own side (i.e. human players) then mission failed you murdering bastards.
Title: Re:mission idea - need input
Post by: The-Architect on 28 Sep 2005, 16:05:06
Lock the vehicles.
Title: Re:mission idea - need input
Post by: Mr.Peanut on 28 Sep 2005, 16:24:58
This is a good idea mac, but what if all AI drivers get killed by the enemy?  I would still like the players to be able to carry on.

Maybe the only solution is triggers alongside route that blow the trucks up if they stray.  I could mark it on map as a minefield.

Add EHs "killed" to the drivers.  If more than two of them get killed by their own side (i.e. human players) then mission failed you murdering bastards.
Title: Re:mission idea - need input
Post by: Terox on 28 Sep 2005, 17:05:38
1)  Add killed event handlers and have a side check ran in the script to see what side the killers are

2) Lock the vehicles anyway and have the killed event unlock the vehicle driver on event of being killed by the enemy
... Have each truck have a co driver, on the event of main driver being killed, then movindriver the co driver

3) Set up X amount of routes, and place empty markers for each waypoint position on that route, same number of markers as waypoints, same number of each per route

eg
;; lets call the convoy groupname "Convoy" for example purposes
and lets say that the  convoy has 5 waypoints
Quote
?!(local server):exit
_markers = []
_route1 = ["r1a","r1b","r1c","r1d","r1e"]
_route2 = ["r2a","r2b","r2c","r2d","r2e"]
_route3 = ["r3a","r3b","r3c","r3d","r3e"]
_rnd = random 100
If (_rnd <33)then{_markers =_route1;goto "SETROUTE"}
If (_rnd <66)then{_markers =_route2;goto "SETROUTE"}
If (_rnd <100)then{_markers =_route;goto "SETROUTE"}
#SETROUTE
[Convoy,1]setwppos (getmarkerpos _markers select 0)
[Convoy,2]setwppos (getmarkerpos _markers select 1)
[Convoy,3]setwppos (getmarkerpos _markers select 2)
[Convoy,4]setwppos (getmarkerpos _markers select 3)
[Convoy,5]setwppos (getmarkerpos _markers select 4)
exit

All run server side only, seeing as its a fully qai controlled and manned group


Would be far better than a linear convoy route

Of course, a more elaborate scripting system can be produced, you could have just 1 move waypoint and when the convoy turns up at that waypoint, the waypoint runs a script which setposses it to the next _markers select X (using no delay in the script
That way you can have different number of "Artificial waypoints" per route

eg

Waypoint script

if(count tx_markers <= 0)then {tx_ConvoyEnd = true; Publicvariable "tx_ConvoyEnd"; exit}
_marker = tx_markers select 0
[group this,1] setWPpos (getmarkerpos_marker)
tx_markers = tx_markers - [_marker]


In addition, you could have an addaction attached to the Player commander, which basically allows the lockwp true or false for the onvoy, this way, if he finds a threat infront of him, he can halt the convoy, until the mines have been cleared etc



Good luck with your mission

Title: Re:mission idea - need input
Post by: Mr.Peanut on 28 Sep 2005, 17:24:11
Thanks for suggestions.  I had already considered letting players be able to start and stop convoy. The convoy was to consist of a jeep, an ammo truck, a fuel truck and a repair truck.  I wanted to include an M113 ambulance as well, but it could not keep up.

Originally I wanted to have a few different random routes, but another difficulty is the placement of enemy.  I want all enemy to be strategically placed at mission onset to allow squads of players to scout ahead to clear the route.  I am only going to use enemy infantry, no armour. However, some playtesting revealed that AI are incapable of stopping a moving convoy unless they are very strategically placed.  e.g. Enemy infantry firing an rpg downslope from a perpendicular position almost always missed. Since enemy placement is so critical it can not be left completely random. A good set of positions to randomly choose from must also be made at design time.  Too many possibilities.  I think I will have to stick with one route and try and vary enemy placement as much as possible.