Example: Combined Arms
megalo-combined-arms.rmeg is a class mode built from the calls on this page: two teams of six classes, picked in the class picker, with four ways back into the fight. Its first lines say what each class does.
| Design | How |
|---|---|
| Power weapons reserved for a class: rockets, Spartan Lasers, Fuel Rod Guns and Missile Pods for Anti-Armor, Sniper and Beam Rifles for Recon | Each new life, set_weapon_pickup(all, 1), then a bar on each weapon of the other classes. |
| Only Pilots fly crewed aircraft, only Armor drives crewed ground vehicles | set_driver_use(multi_seat_aircraft, 0) for every class but the Pilot, and the same for ground vehicles. Anyone rides as a passenger or gunner. |
| Repairing a vehicle that still stands | Hold Ability 3: is_of_type(aircraft) or ground_vehicle, get_distance_to, and health up 5% twice a second while above 0. |
| Medic: revive the fallen, regenerators | on object death keeps the body and shows it to the team with a dead_teammate waypoint. Holding Ability 3 over it for two seconds revives. place_at_me(regenerator, …) deploys one. |
| Support: ammunition, overshields | place_at_me with an ammunition case's tag path, and refill_ammo for teammates beside it every 3 seconds; biped.shields = 200. |
| Anti-Armor: land mines, power drain | give_equipment(trip_mine); place_at_me(power_drainer, …). |
| Recon: invisibility, marked targets | A trait set with camouflage; get_crosshair_target() and a bullseye waypoint for the Recon's team for 10 seconds. |
| Squad spawns | for each player randomly, the first teammate with get_time_out_of_combat() >= 5 near an object labeled objective; set_primary_respawn_object(mate.biped). |
| Spawn beacons | Objects labeled spawn_beacon: attach_to its carrier, planted with detach and set_position. Ten enemy hits (on object damaged) send it back to its Forge place. |
| Spawn vehicles | Vehicles labeled spawn_vehicle belong to their last driver's team (get_vehicle, is_driver), deploy after three seconds with get_speed() at most 2, and are destroyed when health is 0. |
Label a map's objects in Forge to use the last three; without them, players spawn at the base.
