Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_Tutorial_CombatEngineering_StopAndGetOut.c
Go to the documentation of this file.
1[EntityEditorProps(insertable: false)]
5
6//------------------------------------------------------------------------------------------------
8{
9 protected Vehicle m_Car;
10 protected vector m_vWpPos;
11
12 //------------------------------------------------------------------------------------------------
13 override protected void Setup()
14 {
15 m_Car = Vehicle.Cast(GetGame().GetWorld().FindEntityByName("BUILDING_VEHICLE"));
16 IEntity wpEnt = GetGame().GetWorld().FindEntityByName("WP_CE_PATH6");
17
18 UnregisterWaypoint(wpEnt);
19
20 SCR_Waypoint wp = RegisterWaypoint(wpEnt,"", "GETOUT");
21 if (wp)
22 m_vWpPos = wp.GetPosition();
23 }
24
25 //------------------------------------------------------------------------------------------------
26 override protected bool GetIsFinished()
27 {
28 if (!m_Car || m_vWpPos == vector.Zero)
29 return false;
30
31 return (m_Car.GetPilot() != m_Player) && (vector.Distance(m_Car.GetOrigin(), m_vWpPos) <= 6);
32 }
33
34 //------------------------------------------------------------------------------------------------
35 override protected void OnStageFinished()
36 {
38 m_TutorialComponent.ChangeVehicleLockState(m_Car, true);
39
40 super.OnStageFinished();
41 }
42};
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
proto external BaseWorld GetWorld()
void UnregisterWaypoint(IEntity waypointEntity)
SCR_TutorialGamemodeComponent m_TutorialComponent
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")
vector GetPosition()
Get waypoint position. Attached entity is prioritized over static position.
enum EPhysicsLayerPresets Vehicle
Definition gameLib.c:24