russian armor

WorldBuilder TotW#13: Abandoned Vehicles

WorldBuilder TotW#13: Abandoned Vehicles

Hello and welcome to our WorldBuilder TotW#13!

In this tutorial we will practice some very basic SCAR scripting, resulting in being able to place abandoned vehicles on your maps.

First step:

In the first step you have to place the preferred vehicles to the map. For this tutorial, use the ones in ebps/races/*/vehicles, where * is for the name of the faction, e.g. german, soviet.

Second step:

Next step is to assign these vehicles to an entity group. Select your vehicles and either press Control + G in your keyboard or by clicking "Groups" in the menu bar and selecting "Create Entity Group".

It is recommended to use distinctive names for entity and squad groups. A good practice is to use eg_/sg_ prefixes for entity/squad groups.

For the next step, hit OK and save the map.

Third step:

We will now create a new .scar file to your map's directory. You can do that by opening notepad and pasting in this text:


function OnInit()
Cmd_CriticalHit(World_GetPlayerAt(1), eg_vehicles, CRIT.VEHICLE_ABANDON, 0)


Make sure that you change "eg_vehicles" in the code to match the entity group name you entered in the previous steps.

Then, save the text to your map's folder as .scar file with exactly the same name as your map's .sgb file.
You can now export the package in WorldBuilder and test the results by running the map in-game. You should now have abandoned vehicles in your map.

I hope you enjoyed this weeks WorldBuilder TotW although it was a short guide only.

Stay tuned for more

1 user is browsing this thread: 1 guest