Additional Script Functionality Conditions

This is a table of all the additional mission condition types added by this hack.

 Condition Name Description Initial Release
collectcoins Fail the player if they collect coins. 1.18
collectwrench Fail the player if they collect a wrench. 1.18
destroycars Fail the player if they destroy cars. 1.18
hitandrun Fail the player if they get a hit and run. 1.18
hitandruncaught Fail the player if they get caught during a hit and run. 1.18
hitandrunlost

Fail the player if they lose their Hit & Run. 

 

This condition only fails the player if they lose their Hit & Run without getting caught.

1.18.1
hitandrunrage Fail the player if they reach the part of the Hit & Run meter where it starts blinking red. 1.18
hitpeds

Fail the player if they kick pedestrians. 

 

This DOES NOT currently include hitting them with a car.

1.18
insidetrigger / outsidetrigger Fail the player if they are inside or outside a trigger(s). 1.18
jump Fail the player if they jump. 1.18
maintainspeed Fail the player if they do not maintain a speed within a specified range during the stage. 1.18
spring Fail the player if they bounce on a spring. 1.18

Examples

collectcoins

AddCondition("collectcoins");
	SetCondTotal(3);
CloseCondition();

collectwrench

AddCondition("collectwrench");
	// You can allow more than one wrench if you want to be generous.
	SetCondTotal(2);
CloseCondition();

destroycars

AddCondition("destroycars");
	// Only care if they destroy specific cars (optional)
	AddCondTargetModel("glastruc");

	// Only fail them if they destroy a certain amount.
	SetCondTotal(2);
CloseCondition();

hitandrun

AddCondition("hitandrun");
	// The default delay is 2 seconds.
	AddCondDelay(2);
CloseCondition();

hitandruncaught

AddCondition("hitandruncaught");
	// The default delay is 2 seconds.
	AddCondDelay(2);
CloseCondition();

hitandrunlost

AddObjective("hitandrunlost");

CloseObjective();

hitandrunrage

AddObjective("hitandrunrage");

CloseObjective();

hitpeds

AddCondition("hitpeds");
	// Specify specific characters to trigger the condition.
	AddCondTargetModel("marge");
	AddCondTargetModel("bart");

	// Allow the player to kick any of the specified peds 3 times.
	SetCondTotal(3);
CloseObjective();

insidetrigger / outsidetrigger

AddCondition("insidetrigger");
	// Specify a locator whose triggers the player must be inside to advance the condition.
	SetCondTrigger("z2phone1");
	
	// Specify the threshold for passing the stage. Optional.
	SetCondThreshold(10);

	// Set a message to show when inside the trigger. Optional.
	SetCondMessageIndex(3);
	
	// Specify the decay of the meter when the player is not inside any of the triggers. Optional.
	SetCondDecay(3, 2);
	
	// Specify the sound that will play when entering any of the triggers. Optional.
	SetCondSound("enter_trigger","gag_alm2");
	
	// Specify the sound that will play when staying inside any of the triggers. Optional.
	SetCondSound("inside_trigger","countdown_beeps",1,5);
	
	// Specify the sound that will play when exiting the triggers. Optional.
	SetCondSound("exit_trigger","P_HitByC_Mrg_01");
CloseCondition();
AddCondition("outsidetrigger");
	// Specify a locator whose triggers the player must be outside to advance the condition.
	SetCondTrigger("z2phone1");

	// This objective is largely the same except you use "outside_trigger" to specify the sound when you're outside.
	// You can only have an "outside_trigger" sound on an "outsidetrigger" stage.
	SetCondSound("outside_trigger","countdown_beeps",1,5);
CloseCondition();

jump

AddCondition("jump");
	// If a total is specified an onscreen counter is used to represent how many more times the player can jump.
	SetCondTotal(3);
CloseCondition();

maintainspeed

AddCondition("maintainspeed");
	// Make the player keep their speed high but with some breathing room.
	SetCondSpeedRangeKMH(90,150);
CloseCondition();

spring

AddCondition("spring");
	// If a total is specified an onscreen counter is used to represent how many more times the player is allowed to touch a spring.
	SetCondTotal(3);
CloseCondition();
Back to top