This guide provides general info on how to set up the scarab in a custom scenario. The Scarab is a fun opponent to add to custom scenarios, but requires more steps to set up than other AI characters.
Overview
- Add giant tag.
- Add character tag.
- Create a Zone with
giants zone
ticked. - Create giant hints.
- Create a squad with scarab as the character, and set the initial zone to the giants zone.
- Optionally put gunners on the plasma turrets using scripting.
Importing the Scarab
Two different tags must be included in Sapien to have a working scarab: the scarab giant and its character.
Import the giant tag
Edit Types
Select
giant
Add
Find scarab giants folder
Add the
scarab.giant
tag
Import the character tag
Edit Types
Choose
character
Find the scarab AI folder
Add the
scarab.character
tag
Create a giants zone
Selecting the Zones folder.
Click New Instance.
Select Areas.
New Instance.
Right click to place a point.
Set the area of the point.
Place a lot of points.
Name the zone something memorable like
scarabzone
.Set the zone to be a
giants zone
.
Create giant hints
Open AI > Hints > Giant sector hints in the Hierarchy window.
Right click in the scene view to place points to mark out an area where the scarab is allowed to walk.
Left click to finish.
Hover over the corners and drag them around with leftclick.
Place a couple Giant rail hints within the giant sector hints area using right click.
Click Scenarios > Generate all pathfinding data
Click Scenarios > Map reset.
Set up a squad
Select Squads folder.
New Instance.
Select Fire teams
Set the fireteam normal diff count to
1
.Select Starting points.
Place a starting point by right clicking in the scene view.
Set character of the fireteam to
scarab
.Select the squad and rename it something memorable like
scarab squad
.Set the scarab squad's initial zone to the giants zone created earlier in this guide.
Right click the squad and click "Place squad" to spawn the scarab.
Use Ctrl + Q to spawn in and the Scarab will attack and walk around.
Adding side gunners.
Add 3 more starting points to the squad and increase Normal diff count to
4
.On the new starting points, set the character type to Brute or Grunt.
Name the gunner starting points to
gnr1
,gnr2
,gnr3
Use
vehicle_load_magic
andobject_get_turret
in a script to put the gunners on the turrets. An example script is provided below. The script assumes that the squad is calledscarab_squad
.
(script startup my_mission
(print "Mission begin")
(place_scarab)
)
(script static void place_scarab
; Place the squad
(ai_place scarab_squad)
; Put gunners on the turrets
(vehicle_load_magic (object_get_turret (ai_get_object scarab_squad/starting_locations_0) 0) "turret_g" (ai_actors scarab_squad/gnr1))
(vehicle_load_magic (object_get_turret (ai_get_object scarab_squad/starting_locations_0) 1) "turret_g" (ai_actors scarab_squad/gnr2))
(vehicle_load_magic (object_get_turret (ai_get_object scarab_squad/starting_locations_0) 2) "turret_g" (ai_actors scarab_squad/gnr3))
)
Acknowledgements
Thanks to the following individuals for their research or contributions to this topic:
- Rataz (Writing this guide)
- RejectedShotGun (Streaming while adding a scarab to a map)