I had a bunch of ideas for more commands in ASF that posting them in the Discord felt like copypasta. So uh... here it is.
AddObjective("losecars"); AddCondTargetModel("AICAR"); AddCondTargetModel("ANOTHERAICAR"); SetObjDistance(x); TargetsAlwaysActive();Similar to the new "destroycars" objective but it's a "losetail" variant. TargetsAlwaysActive will make it so that even if the player loses one of the targets but not the rest, it'll still have a chance to catch up. If it's not there, AI cars that lost the player despawn.
AddObjective("pushcars"); AddCondTargetModel("AICAR"); AddCondTargetModel("ANOTHERAICAR"); AddTrigger("TRIGGER"); AddTrigger("ANOTHERTRIGGER");Target vehicles need to hit any of the triggers assigned for the player to clear the stage. Maybe I want an AI car to avoid going to the beach in Level 3, and I want the player to push it towards the beach.
//x = Maximum ambush cars that can appear at once. // Must be greater than 0. If left blank, default to 1. AddCondition("ambush", x); AddCondVehicle("AICAR"); AddCondVehicle("DIFFERENTAICAR");Previously suggested in a Twitter post, but I had so little room to write how Ambush could work. Ambush works similar to Hit & Run, but these vehicles can't bust you (and they can be any vehicle and not just the cop cars that the level has already loaded). They spawn and despawn just like the H&R cops.
SetStageAsResetPoint(x); //x = Locator where player will respawn after resetI'm sure a lot of you have had an idea like this before. When the player fails/restarts the mission during or after the stage that contains this, they will go back to the last stage containing this command at the locator defined.
AddObjective("delivery or dump"); AddCollectible("COLLECTIBLE"); SetTargetValue(x); SetFakeTargetValue(y); SetInstantCompleteCollectible("COLLECTIBLE"); //x = Target number of things the player needs to collect, // even if there's more than enough items to collect. //y = Target number the HUD will display even if SetTargetValue // is set to something else.Road Rage Returns did something similar, but collecting the last items will play a barrage of "collect" sounds.
AddObjective("race"); AddCollectible("LOCATOR", "MODEL"); AddCollectible("ANOTHERLOCATOR", "MODEL"); AddCollectible("YETANOTHERLOCATOR", "MODEL"); NoCollectSound();Don't play a sound when hitting a checkpoint. Useful for missions like The Fat and Furious.
AddObjective("timer"); SetDurationTime(TIME); StageIsCutscene(x, "PLAYER_LOCATOR_IF_SKIPPED"); AddCutscenePlayerWaypoint("player", "WAYPOINT"); AddCutscenePlayerWaypoint("npc", "ANOTHERWAYPOINT"); SetStageCam("CAMERA_LOADED_IN_M#L.MFK"); //x = Number of stages to skip when cutscene is skipped. If 0, it cannot be skipped at all.StageIsCutscene adds the black bars during a start cam transition or dialogue stage, and it makes the player lose control of their character.
AddCondition("race"); NoDistantFailure();Player will not fail the mission if the target car is too far away. Some mods have missions that have this problem.
EDIT 1
SetStageTime(x); DisplayTimeAt(y); //y = anything below xSurprise people and make them say, "Wait. This mission has a time limit?" The time limit won't appear until it has reached below the value in DisplayTimeAt.
AddStageVehicle("AICAR", "LOCATOR", "ANYTHING_BUT_NULL", "STAT_FILE","DRIVER", "DELAY_TYPE", x, GROUP_NUMBER); ActivateVehicle("AICAR", "DONT_KNOW_WTH_THIS_IS", "ANYTHING_BUT_NULL", "DELAY_TYPE", x, GROUP_NUMBER); //x = depends on the delay type //y = group numberDELAY_TYPE and x are used for activating an AI car after a certain amount of time.
If DELAY_TYPE is "distance", x is the minimum distance the player can be away from the target before it starts moving.
If DELAY_TYPE is "time", x is the number of seconds the target waits for before moving. Can be a decimal.
The group number is explained in the next idea.
AddStageGroupWaypoint(x, "LOCATOR"); //x = AI cars with the matching group number will go this waypointOne AI car may want to go to Kwik-E-Mart, while another may want to go to the Power Plant. This command allows different AI cars to take different paths.
UseRandomWaypoints(); AddStageRandomWaypoint("LOCATOR1", x); AddStageRandomWaypoint("LOCATOR2", x); AddStageRandomWaypoint("LOCATOR3", x); //x = Chance the AI cars will go to this locatorAI cars will randomly choose which waypoint to go to first (but they won't all go to the same ones), and each waypoint reached will make the AI car randomly choose the next waypoint (as long as it's not the waypoint they just touched).
SetStageAIChaseParams("AICAR", x1, x2, x3, y1, y2, y3, y4, y5); //x1 = Whether or not AI cars will chase the player (0 or 1) //x2 = Minimum time AI car will change targets while currently chasing the player //x3 = Maximum time AI car will change targets while currently chasing the player //y1 = Whether or not AI cars will chase other AI cars (0 or 1) //y2 = Minimum time AI car will change targets while currently chasing another AI car //y3 = Maximum time AI car will change targets while currently chasing another AI car //y4 = Whether AI car will always go back to targeting the player (0) or another AI car (1) //y5 = The only other AI car that the car will chase //EXAMPLES SetStageAIChaseParams("wiggu_v", 0, 0, 0, 1, 0, 0, 0, "snake_v"); //Wiggum will only chase Snake. All six of the 0's don't matter. SetStageAIChaseParams("snake_v", 1, 0, 0, 0); //Snake will only chase the player SetStageAIChaseParams("plowk_v", 1, 20, 60, 1, 5, 10, 0); //Barney will chase the player and other AI cars, but the player is his primary target SetStageAIChaseParams("otto_v", 1, 1, 2, 1, 20, 20, 1); //Otto will chase the player and other AI cars, but the other AI cars are his primary targetsUm... ok. I don't know how to explain this one.
StageVehiclesCanDamageOthers();Some mods use AddStageVehicle to place the player inside another vehicle mid-mission. Unfortunately, they can't deal damage to other vehicles. This command will fix this. Would've suggested this as a standalone hack, but what if I want a 1v3 fight and don't want AI cars to accidentally blow themselves up?