Tic-Toc Race

== Introduction ==
In Dreamball, the game modes used are not made of new entities, they are made entirely from current entities. To make the game modes it's just a matter of setting up entities how you want them, without being tied to a specific way. This quick tutorial will give you the over view to creating a Tic-Toc Race gamemode.
*You can make the Tic-Toc as long as you want, but this tutorial will go over how it was done in Dreamball's map.
== Construction ==
First create a logic_auto entity. Now place 4 ambient_generics. Name all four:
*tic1
*tic2
*tic3
*tic4
Now for each one, select it's sound as:
*tic1: gamerules/timer/tic_toc1.wav
*tic2: gamerules/timer/tic_toc2.wav
*tic3: gamerules/timer/tic_toc3.wav
*tic4: gamerules/timer/tic_toc1.wav
Go into the logic_auto you placed earlier and add these 8 outputs:
:
	My Output >	Target Entity	Target Input	Parameter	Delay	Only Once
	OnMapSpawn 	tic1 	PlaySound 	None 	0.00 	Yes
	OnMapSpawn 	tic1 	StopSound 	None 	14.00	Yes
	OnMapSpawn 	tic2 	PlaySound 	None 	15.00	Yes
	OnMapSpawn 	tic2 	StopSound 	None 	29.00	Yes
	OnMapSpawn 	tic3 	PlaySound 	None 	30.00	Yes
	OnMapSpawn 	tic3 	StopSound 	None 	44.00	Yes
	OnMapSpawn 	tic4 	PlaySound 	None 	45.00	Yes
	OnMapSpawn 	tic4 	StopSound 	None 	59.00	Yes
If you haven't already noticed, this basically gives us a 1 minute (repeat the process for longer timers) timer.
Next add in a game_text entity. Name this failed_end_text. In it's properties, in the Message Text field add:
:Stage Failed - Time not beaten!
(or similar, but appropriatly)
Now back in that logic_auto entity, add this output:
:
	My Output >	Target Entity 	Target Input	Parameter	Delay	Only Once
	OnMapSpawn 	failed_end_text	Display 	None 	0.00 	Yes
This just gives us the end text, if we did not beat the tic-toc.
Now place a game_text entity again, and name it win_end_text. Inside set the Message text as 
:Stage Complete!
(or similar, but appropriatly)
Now place a trigger_once brush, and name it trigger_end. Place this where your finish line of the map is. Add these outputs:
:
	My Output > 	Target Entity 	Target Input	Parameter 	Delay	Only Once
	OnStartTouch	win_end_text 	Display 	None 	0.00 	Yes
	OnStartTouch	console_commands	Command 	disconnect; map_background background01	4.00 	Yes
Now place a point_clientcommand entity. Name it console_commands'. Now back to that logic_auto entity, add this output:
:
	My Output >	Target Entity 	Target Input	Parameter 	Delay	Only Once
	OnMapSpawn 	console_commands	Command 	disconnect; map_background background01	60.00	Yes
This wil end our map after the timer. Additionally instead of a Disconnect command, you could have restart cvar.
== Conclusion ==
That is the base setup. You should have a map that has a tic-toc sound timer for 60 seconds, and ends on the finish line, or if you don't reach the finish line. And displays on screen the status of each ending. There is more needed to get this more 'realistic' looking, but they are just effects. But still recommended, a list here:
*trigger brush under map, that ends the map. (required for realism)
*env_fade to fade the screen on end map. 
*info_particle_system to give the ffects for the finish line.
As you may see, Tic-Toc Race is somewhat simple but just takes the correct amount of tweaking to get perfect!
==See also==
*List of Dreamball Particles
*Dreamball Level Creation
Category:Level Design