Jump to content
Sign in to follow this  
mindstorm

Dynamics Race Script

Recommended Posts

Dynamics Race Script

I'm proud to present to you my race script. With this script you can create your own race maps really simple!!!

Content

Features:

  • 8 Different race modes
  • Vote system for race mode
  • Vote system for damage enabled/disabled
  • Vote system for vehicle type (all vehicles available, even carts without dlc*)
  • Team selection dialog
  • As many players as you like (have not tested performance with high numbers)
  • Countdown timer
  • Race timer
  • Current Position
  • Checkpoints
  • Race result screen
  • Race continues for 60 seconds after 1st player finishes
  • Spectate mode for finished & JIP players
  • Vehicle reset/repair
  • Vehicle reset if leaving the road
  • Smoke screens
  • Explosion triggers
  • Traffic spawning triggers
  • A-B race or multiple laps

*You can race with carts since my scripts places players into the vehicle at the start of a race. Players who do not own the carts DLC get the buy this DLC option after the mission ends.

Race modes:

Normal race:

Normal race. Damage can be enabled or disabled. If damage is disabled taking damage will slow you down.

Driver & Gunner:

Every vehicle has a driver and a gunner. The gunner can shoot at other vehicles, if damage is disabled it will slow them down. For balance reasons the gunner can only shoot in front of the vehicle.

Team race:*

Same as driver & gunner race but each team also has a Commander. The commander has a spectator view of the map and he can activate commander features. Features cost commander points which he gaines every second. Features include: Spawn smoke/explosive barrels, boost, repair, spawn and control infantry (for short time) and spawn and control vehicles.

Cops & Robbers*

In this race robbers are trying to escape with armored vehicles from the police. The robber team consist of a driver & gunner. The cops must try to halt all robbers. They can do this by destroying them or by making them move slower then 10km/h for 5 seconds.

Cops, Robbers & Commander*

Same as cops & robbers, only this time the police are assisted by commanders.

Cat & Mouse*

In this race each time consists of a mouse and one or multiple cats (max 6 teams, more cats per team depending on player amount). A team wins if their mouse finish first. Cats must obstruct other player's mouse.

Cat, Mouse & Commander*

Same as cat & mouse, but each team also has a commander.

*Race are only available for voting once enough players have joined the server. If there is an uneven player amount commander slots will be available for those players.

Video

*If you have a decent rig and play this mission with friends please record video's of it so I can create a better video. Credits will be given of course.*

More video's

Normal race:

Driver & Commander:

Cops & Robbers:

Cat & Mouse:

Installation

Below is the bare minimum listed to make a nice race mission. More stuff is located in the readme file on github.

init.sqf

call compile preprocessFile "dynrace\init.sqf";

Mandatory:

DYN_RACE_MUST_STAY_ON_ROAD = bool;

Optional:

DYN_RACE_LAPS = int; (default is 1)

description.ext

#include "dynrace\client\ui\dynrace.hpp"
class CfgSounds
{
	sounds[] = {};
	class BEEP
	{
		name = "BEEP";
		sound[] = {"audio\beep.ogg", 1, 1};
		titles[] = {};
	};
	class BEEP_HIGH
	{
		name = "BEEP_HIGH";
		sound[] = {"audio\beep_high.ogg", 1, 1};
		titles[] = {};
	};
};

//Params are all optional!
class Params
{
class MB_WEATHER_PARAM {
         title = "Starting Weather";
         values[] = {0,1,2,3,4};
         texts[] = {"Clear","Overcast","Rain","Fog","Random"};
         default = 4;
   };
class DYN_RACE_DAYTIME
{
	title = "Time Of Day";
	values[] = {1, -8, -4, 0, 6, 13};
	texts[] = {"Random", "Early Morning", "Morning", "Noon", "Sundown", "Night"};
	default = 0;
};
class DYN_RACE_LAPS
{
	title = "Amount of laps";
	values[] = {2,3,4,5};
	texts[] = {"2","3","4","5"};
	default = 2;
};
class DYN_RACE_DEFAULT_SMOKE_SCREEN_AMOUNT
{
	title = "Smoke screens available";
	values[] = {0,5,10,20,50};
	texts[] = {"0","5","10","20","50"};
	default = 10;
};
class DYN_RACE_TIMETOFINISH
{
	title = "Time to finish (after 1st person finishes)";
	values[] = {0,30,60,120};
	texts[] = {"0","30","60","120"};
	default = 60;
};
class DYN_RACE_ROBBER_SPEEDLIMIT
{
	title = "Robber speed limit (if lower then this & vehicle near they get caught)";
	values[] = {5,10,20,30,40};
	texts[] = {"5","10","20","30","40"};
	default = 10;
};
class DYN_RACE_ROBBER_DISTANCELIMIT
{
	title = "Robber distance limit (if distance from cop to robber is lower then this & speed is lower then above)";
	values[] = {5,10,15,30,40};
	texts[] = {"5","10","15","30","40"};
	default = 15;
};
class DYN_CAN_SHOOT_BACKWARDS
{
	title = "Gunners can only shoot forward";
	values[] = {0,1};
	texts[] = {"Only forward","Also backward"};
	default = 1;
};
class DYN_ENABLE_AIPARAM
{
	title = "Enable AI (only use for testing)";
	values[] = {0,1};
	texts[] = {"Disable","Enable"};
	default = 0;
};
};

Map markers

DYN_RACE_Respawn: Respawn location for racers after a race

DYN_RACE_Start_Position: From this point start positions will be generated, along the road or not depending on init setting.

DYN_Checkpoint_X: start with DYN_Checkpoint_1 and increment. Don't create the finish checkpoint. Face in direction of track.

Trigger

DYN_RACE_FINISHTRIGGER: This is your finish line. Face in direction of players. No onActs or conditions.

For more triggers see readme file.

Downloads

Github

Thread with 3 example missions

Known issues

You can test maps with AI, they won't be much of a match tho. With AI your current position won't display correctly. Finish positions work however.

Version history

## 0.0.4

Updates:

-Added random start time of day

-Added random start weather

-Added new mission params for weather, time of day, smoke screen amount, timetofinish, robber speed & distance limit and can shoot backwards

-More detailed descriptions of racemodes

-Start info for drivers about reset

-Start info for gunners about disabled guns

Bugfixes:

-Fixed commander MP param sync causing less commander actions to display for clients

-Fixed smokescreen not working

-Fixed police siren not working

## 0.0.3

Updates:

-Added finish line

-Added checkpoint visuals

-Added all non-armored vehicles to normal races

-Added information/help messages to Cat&Mouse en Robbers race

-Added spawn point generation algorithm

-Added more vehicles to dual races

-Added screenshake for robers if they almost get caught

-New commander action: Spawn explosive barrel (Special thx to KillzoneKid)

-Commander action spawn vehicle now deploys with parachutes (also thx to KillzoneKid).

Bugfixes:

-GUI Fixes for vote dialogue

-Temporary sound placeholders for gui buttons

-Removed autonomous vehicles from vehicle list

-Bug where you would become commander again if you where it previously and did not vote for a new race type.

## 0.0.2

Updates:

- cats & robbers max 6 teams with increasing cat count

- overview of team before race start

- cat & mouse teams based on colors

- gui updates on position and time

- added mission parameter to enable AI (for testing).

Bugfixes:

- not being able to start a race due to false online racer count

- commander spectator fix

- dual race team creation fix

- vehicle resupply fix

## 0.0.1

Initial build

Credits

  • Team Dynamics: Testing
  • Killzone_Kid: For his help with tons of things. Without him I would have spend a lot more time creating this script.
  • Kronzky: String functions
  • Meatball weather script
  • JoSchaap, JW Custom, Chillroy and many others from arma3 scripting forum: Testing/troubleshooting and help with scripting.

Edited by mindstorm

Share this post


Link to post
Share on other sites

Added support for weather, time and multiple mission parameters today..

Also made a trailer which might be a little better then the boring video I had first (see fp). Would still love to see some footage of large races with decent video settings :).

Changelog:

## 0.0.4

Updates:

-Added random start time of day

-Added random start weather

-Added new mission params for weather, time of day, smoke screen amount, timetofinish, robber speed & distance limit and can shoot backwards

-More detailed descriptions of racemodes

-Start info for drivers about reset

-Start info for gunners about disabled guns

Bugfixes:

-Fixed commander MP param sync causing less commander actions to display for clients

-Fixed smokescreen not working

-Fixed police siren not working

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×