Login

russian armor

Worldbuilder Tip of the Week #14 & #15

highlight
An Introduction to Issues 14 and 15


A message from the Director of Maps & Mods


Hello Ladies and Gents, and welcome back to this week's WorldBuilder Tip of the Week!

You may have noticed a change in our title for this week, as we have two Tips for you, thanks to the release of the Western Front Armies expansion. So, please enjoy both Issue 14 and Issue 15 of this week's Tip of the Week, including a written guide by our very own Janne252 and a newly formatted Video Guide by myself!

Until next time,

MonoBaco
WorldBuilder TotW #14: Animator States


In this tutorial we will practice some very basic SCAR scripting, similar to WB TotW#13, Abandoned vehicles. This time we will be focusing on using lamps with light ON.

First step is to place the preferred lamps to the map. Lamps are located in ebps/environment/art_ambient/objects/posts/lamp



If you are looking for the searchlight, it is located in ebps/environment/art_ambient/objects/defences/metal



Next step is to assign these lamps to an entity group. Select your lamps 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.

In this tutorial we are going to use eg_lamps for the lamps.

Once you have created the egroup, save the map and prepare for the next step.

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

Code

function OnInit()
EGroup_SetAnimatorState(eg_lamps, "Light_State", "On")
end

Scar_AddInit(OnInit)



Make sure that you change "eg_lamps" 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 lamps in your map with light ON!
WorldBuilder TotW #15: WFA Assets


Please enjoy our new Video Format, and subscribe for future updates!



That's all for this week.

We hope this tip was helpful and you check back next week, when we will provide you with a new Worldbuilder TotW.
1 user is browsing this thread: 1 guest