7 [
Attribute(
"0", UIWidgets.EditBox,
"How often will the vehicle respawn when destroyed. (seconds, 0 = no respawn)",
"0 inf 1")]
10 [
Attribute(
"0", UIWidgets.ComboBox,
"Select Entity Labels which you want to optionally include to random spawn. If you want to spawn everything, you can leave it out empty.",
"", ParamEnumArray.FromEnum(
EEditableEntityLabel))]
13 [
Attribute(
"0", UIWidgets.ComboBox,
"Select Entity Labels which you want to exclude from random spawn.",
"", ParamEnumArray.FromEnum(
EEditableEntityLabel))]
16 [
Attribute(
"0",
desc:
"If true, only assets with ALL of provided included labels will be used.")]
19 protected static const int SPAWNING_RADIUS = 5;
133 faction =
SCR_Faction.Cast(comp.GetDefaultAffiliatedFaction());
141 Resource prefab = Resource.Load(
m_sPrefab);
143 if (!prefab || !prefab.IsValid())
152 Print(
"SCR_AmbientVehicleSpawnPointComponent: FindEmptyTerrainPosition failed at " +
GetOwner().
GetOrigin().ToString(), LogLevel.WARNING);
163 EntitySpawnParams
params = EntitySpawnParams();
164 params.TransformMode = ETransformMode.WORLD;
175 CarControllerComponent_SA carController = CarControllerComponent_SA.Cast(
m_Vehicle.FindComponent(CarControllerComponent_SA));
179 carController.SetPersistentHandBrake(
true);
181 Physics physicsComponent =
m_Vehicle.GetPhysics();
184 if (physicsComponent)
185 physicsComponent.SetVelocity(
"0 -1 0");
187 EventHandlerManagerComponent handler = EventHandlerManagerComponent.Cast(
m_Vehicle.FindComponent(EventHandlerManagerComponent));
220 RplComponent.DeleteRplEntity(
m_Vehicle,
false);
235 SCR_EntityCatalogManagerComponent comp = SCR_EntityCatalogManagerComponent.GetInstance();
246 array<SCR_EntityCatalogEntry>
data = {};
261 if (!factionComponent)
263 Print(
"SCR_AmbientVehicleSpawnPointComponent: SCR_FactionAffiliationComponent not found on owner entity. Vehicle spawning will not be available.", LogLevel.WARNING);
267 SetEventMask(owner, EntityEvent.INIT);
278 manager.RegisterSpawnpoint(
this);
290 manager.UnregisterSpawnpoint(
this);