- Joined
- Nov 30, 2013
- Messages
- 926
How this works?
- When every timer ends, it causes them to teleport into the next region. If being watched or watching the region that where it's going to teleport, it will cause them not to teleport until both of them is returned false. If they reached the second-to-the-last region but accidently being spotted, it will returned back to its starting point if not being viewed by the player.
What causes the problem
- Most of the If/Else statements were fine except for the last one that being indicated as "Failed to Jumpscare".
It'd run but they haven't teleported back into their starting point. Game text had shown itself but they still haven't teleported back.
After this happen, the trigger stills run as the other If/Else statements at the "Movement System" works, but it still doesn't change its position.
P.S
- These units have a Locust Ability so they'll be used at the Unit Group than identifying them if there are in what region.
Where's the triggers?
- Here
Unit's Movement Trigger
- When every timer ends, it causes them to teleport into the next region. If being watched or watching the region that where it's going to teleport, it will cause them not to teleport until both of them is returned false. If they reached the second-to-the-last region but accidently being spotted, it will returned back to its starting point if not being viewed by the player.
What causes the problem
- Most of the If/Else statements were fine except for the last one that being indicated as "Failed to Jumpscare".
It'd run but they haven't teleported back into their starting point. Game text had shown itself but they still haven't teleported back.
After this happen, the trigger stills run as the other If/Else statements at the "Movement System" works, but it still doesn't change its position.
P.S
- These units have a Locust Ability so they'll be used at the Unit Group than identifying them if there are in what region.
Where's the triggers?
- Here
Unit's Movement Trigger
-
Red Golem AI
-
Events
-
Time - Every 0.06 seconds of game time
-
-
Conditions
-
Actions
-
Trigger - Turn off (This trigger)
-
-------- Temp Variable --------
-
Set GolemAI_VarID = 1
-
Set GolemAI_TempUnitType[GolemAI_VarID] = Red Golem
-
Set GolemAI_TempID[GolemAI_VarID] = 1
-
Set GolemAI_TempRivalID[GolemAI_VarID] = 2
-
Set GolemAI_TempAngle[0] = 270.00
-
Set GolemAI_TempAngle[1] = 270.00
-
Set GolemAI_TempAngle[2] = 180.00
-
Set GolemAI_TempAngle[3] = 90.00
-
Set GolemAI_TempAngle[4] = 90.00
-
Set GolemAI_MaxPathing[GolemAI_VarID] = 4
-
Set GolemAI_VarID = 0
-
-------- Temp Variable --------
-
Wait GolemAI_MoveTimer[GolemAI_TempID[1]] seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
isGameReady Not equal to True
-
-
Then - Actions
-
-------- Initiate Jumpscare --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to 3
-
IsRearLightOn Equal to False
-
IsCamMoving Equal to False
-
GolemAI_IsGolemFlashed[GolemAI_TempID[1]] Equal to False
-
((PlayerViewType Equal to 0) and (PlayerView Not equal to 1)) or (PlayerViewType Equal to 1)
-
GolemAIPos[GolemAI_TempRivalID[1]] Not equal to 4
-
-
Then - Actions
-
Set GolemAI_JumpscareRear = True
-
Set GolemAIPos[GolemAI_TempID[1]] = 4
-
If (DebugMode Equal to True) then do (Game - Display to (All players) the text: (|cffff0000Red Golem|r: + Jumpscared the player.)) else do (Do nothing)
-
-
Else - Actions
-
-
-------- Golem AI Movement System --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to 2
-
(CamID Not equal to 0) and (IsRearLightOn Not equal to True)
-
GolemAIPos[GolemAI_TempRivalID[1]] Not equal to 3
-
-
Then - Actions
-
Set GolemAIPos[GolemAI_TempID[1]] = 3
-
If (DebugMode Equal to True) then do (Game - Display to (All players) the text: (|cffff0000Red Golem|r: + Walked to Rear Light Location.)) else do (Do nothing)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to 1
-
GolemAIPos[GolemAI_TempRivalID[1]] Not equal to 2
-
(CamID Not equal to 2) and (CamID Not equal to 0)
-
-
Then - Actions
-
Set GolemAIPos[GolemAI_TempID[1]] = 2
-
If (DebugMode Equal to True) then do (Game - Display to (All players) the text: (|cffff0000Red Golem|r: + Walked to Main Hall.)) else do (Do nothing)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to 0
-
GolemAIPos[GolemAI_TempRivalID[1]] Not equal to 1
-
(CamID Not equal to 3) and (CamID Not equal to 2)
-
-
Then - Actions
-
Set GolemAIPos[GolemAI_TempID[1]] = 1
-
If (DebugMode Equal to True) then do (Game - Display to (All players) the text: (|cffff0000Red Golem|r: + Walked to East Hall.)) else do (Do nothing)
-
-
Else - Actions
-
-
-------- Failed to Jumpscare --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to 3
-
IsRearLightOn Equal to False
-
GolemAI_IsGolemFlashed[GolemAI_TempID[1]] Equal to True
-
CamID Not equal to 3
-
-
Then - Actions
-
Set GolemAIPos[GolemAI_TempID[1]] = 0
-
Set GolemAI_IsGolemFlashed[GolemAI_TempID[1]] = False
-
If (DebugMode Equal to True) then do (Game - Display to (All players) the text: (|cffff0000Red Golem|r: + Return back to spawn point.)) else do (Do nothing)
-
-
Else - Actions
-
-
-------- Golem AI Movement System --------
-
Unit Group - Pick every unit in Player12Golem and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Equal to GolemAI_TempUnitType[GolemAI_TempID[1]]
-
-
Then - Actions
-
Set TempPoint = (Center of RedGolemWayPoint[GolemAIPos[GolemAI_TempID[1]]])
-
For each (Integer A) from 0 to GolemAI_MaxPathing[GolemAI_TempID[1]], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GolemAIPos[GolemAI_TempID[1]] Equal to (Integer A)
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to TempPoint, facing GolemAI_TempAngle[(Integer A)] degrees
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_TempPoint)
-
-
Else - Actions
-
-
-
-
-------- Resetting Temporary Variable --------
-
Set GolemAI_MaxPathing[GolemAI_TempID[1]] = 0
-
Set GolemAI_TempUnitType[GolemAI_TempID[1]] = No unit-type
-
Set GolemAI_TempID[1] = -1
-
Set GolemAI_TempRivalID[1] = -1
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set GolemAI_TempAngle[(Integer A)] = 0.00
-
-
-
-------- Resetting Temporary Variable --------
-
Trigger - Turn on (This trigger)
-
-
Else - Actions
-
Trigger - Turn off (This trigger)
-
-
-
-
-
Init Region
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- AI Waypoint --------
-
Set RedGolemWayPoint[0] = RedGolemPos1 <gen>
-
Set RedGolemWayPoint[1] = RedBlueGolemPos2 <gen>
-
Set RedGolemWayPoint[2] = RedBlueGolemPos3 <gen>
-
Set RedGolemWayPoint[3] = GolemPos4 <gen>
-
Set RedGolemWayPoint[4] = GolemJumpscareBack <gen>
-
Set BlueGolemWayPoint[0] = BlueGolemPos1 <gen>
-
Set BlueGolemWayPoint[1] = BlueGolemPos2 <gen>
-
Set BlueGolemWayPoint[2] = BlueGolemPos3 <gen>
-
Set BlueGolemWayPoint[3] = GolemPos4 <gen>
-
Set BlueGolemWayPoint[4] = GolemJumpscareBack <gen>
-
Set YellowGolemWayPoint[0] = YellowGolemPos1 <gen>
-
Set YellowGolemWayPoint[1] = RedBlueGolemPos2 <gen>
-
Set YellowGolemWayPoint[2] = RedBlueGolemPos3 <gen>
-
Set YellowGolemWayPoint[3] = GolemPos4 <gen>
-
Set YellowGolemWayPoint[4] = GolemJumpscareBack <gen>
-
-