- Joined
- Nov 30, 2007
- Messages
- 1,202
I've started to tinker a interaction system, currently you can only use it on doors, providing the user with different options Open/Close, Lock/Unlock, Knock, Close and Lock.
Anyway the bug accours when you open and close.
I open the gate, I can pass through. Then I Close the gate, I can't pass through. I open it again and still everything is fine. But when I cross the gate multiple times, the pathing of the gate is turned on and the hidden gate all of a sudden is blocking my path?
Basically there are two preplaced gates. One with pathing and one thatis invulnerable without pathing. You can select them both with the interact spell. Only one is visible at a time.
Related Triggers:
Anyway the bug accours when you open and close.
I open the gate, I can pass through. Then I Close the gate, I can't pass through. I open it again and still everything is fine. But when I cross the gate multiple times, the pathing of the gate is turned on and the hidden gate all of a sudden is blocking my path?
Basically there are two preplaced gates. One with pathing and one thatis invulnerable without pathing. You can select them both with the interact spell. Only one is visible at a time.
Related Triggers:
-
Door Open
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Options
- (Ability being cast) Equal to Open Door
-
Actions
- Game - Display to (All players) the text: Door open is runnin...
-
For each (Integer A) from 0 to 200, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- InteractionSelectedDest[(Player number of (Triggering player))] Equal to DoorDestClosed[(Integer A)]
-
Then - Actions
- Destructible - Open DoorDestClosed[(Integer A)]
- Destructible - Hide DoorDestClosed[(Integer A)]
- Destructible - Show DoorDestOpen[(Integer A)]
- Set DoorLocked[(Integer A)] = False
- Custom script: call SelectUnitRemove(udg_InteractionOptionsUnit[GetConvertedPlayerId(GetTriggerPlayer())])
- Custom script: return
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
-
Door Close
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Options
- (Ability being cast) Equal to Close Door
-
Actions
- Game - Display to (All players) the text: Door Closed is run...
-
For each (Integer A) from 0 to 200, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- InteractionSelectedDest[(Player number of (Triggering player))] Equal to DoorDestOpen[(Integer A)]
-
Then - Actions
- Destructible - Close DoorDestClosed[(Integer A)]
- Destructible - Show DoorDestClosed[(Integer A)]
- Destructible - Hide DoorDestOpen[(Integer A)]
- Custom script: call SelectUnitRemove(udg_InteractionOptionsUnit[GetConvertedPlayerId(GetTriggerPlayer())])
- Custom script: return
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
-
Initiate Interaction
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Interact
-
Actions
- Custom script: local integer Array
- Custom script: local string s
- Custom script: local unit u
- Custom script: local player p = GetTriggerPlayer()
- Custom script: local integer int = GetConvertedPlayerId(p)
- Custom script: local location loc = GetRectCenter(gg_rct_Options_Spawn)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Equal to LocalPlayer
-
Then - Actions
- Custom script: set s = "Abilities\\Spells\\Orc\\AncestralSpirit\\AncestralSpiritCaster.mdl"
- Else - Actions
-
If - Conditions
- Custom script: call AddSpecialEffectLocBJ(GetUnitLoc(GetSpellTargetUnit()),s)
- Custom script: call AddSpecialEffectLocBJ(GetDestructableLoc(GetSpellTargetDestructable()),s)
- -------- --------
- Custom script: call CreateNUnitsAtLoc( 1, 'hhou',p, loc, 0.00 )
- Custom script: set u = GetLastCreatedUnit()
- Custom script: set udg_InteractionOptionsUnit[int] = u
- Custom script: call SelectUnitForPlayerSingle(u, p )
- Custom script: set udg_InteractionSelectedDest[int] = GetSpellTargetDestructable()
- Custom script: set udg_InteractionSelectedUnit[int] = GetSpellTargetUnit()
- Game - Display to (All players) the text: Interaction Window ...
- -------- Door Interaction --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Destructible-type of (Target destructible of ability being cast)) Equal to Gate Closed (Elven)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Custom script: call UnitAddAbilityBJ( 'A005', u)
- Custom script: call UnitAddAbilityBJ( 'ACwe', u)
-
For each (Integer A) from 0 to 200, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- InteractionSelectedDest[(Player number of (Triggering player))] Equal to DoorDestClosed[(Integer A)]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DoorLocked[(Integer A)] Equal to False
-
Then - Actions
- Custom script: call UnitAddAbilityBJ( 'Aslp', u )
-
Else - Actions
- Custom script: call UnitAddAbilityBJ( 'A008', u)
-
If - Conditions
- Custom script: return
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Destructible-type of (Target destructible of ability being cast)) Equal to Gate Open (Elven)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- -------- Close --------
- Custom script: call UnitAddAbilityBJ( 'A006', u)
-
For each (Integer A) from 0 to 200, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- InteractionSelectedDest[(Player number of (Triggering player))] Equal to DoorDestOpen[(Integer A)]
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DoorLocked[(Integer A)] Equal to False
-
Then - Actions
- -------- Close and Lock --------
- Custom script: call UnitAddAbilityBJ( 'A007', u )
- Else - Actions
-
If - Conditions
- Custom script: return
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Else - Actions
-
If - Conditions
- Custom script: set u = null
- Custom script: set p = null
- Custom script: call RemoveLocation(loc)
-
Events
-
Abort Interaction
-
Events
- Player - Player 1 (Red) Deselects a unit
- Player - Player 2 (Blue) Deselects a unit
- Player - Player 3 (Teal) Deselects a unit
- Player - Player 4 (Purple) Deselects a unit
- Player - Player 5 (Yellow) Deselects a unit
- Player - Player 6 (Orange) Deselects a unit
- Player - Player 7 (Green) Deselects a unit
- Player - Player 8 (Pink) Deselects a unit
- Player - Player 9 (Gray) Deselects a unit
- Player - Player 10 (Light Blue) Deselects a unit
- Player - Player 11 (Dark Green) Deselects a unit
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Options
-
Actions
- Custom script: call RemoveUnit(udg_InteractionOptionsUnit[GetConvertedPlayerId(GetTriggerPlayer())])
- Set InteractionSelectedDest[(Player number of (Triggering player))] = No destructible
- Set InteractionSelectedUnit[(Player number of (Triggering player))] = No unit
- Set InteractionOptionsUnit[(Player number of (Triggering player))] = No unit
- Game - Display to (All players) the text: Interaction Window ...
-
Events
-
Setup Doors
- Events
- Conditions
-
Actions
- Set DoorRect[0] = Library Door <gen>
- Set DoorTime[0] = 08002100
- -------- Apartment 1 --------
- Set DoorDestClosed[1] = Gate Closed (Elven) 0066 <gen>
- Set DoorDestOpen[1] = Gate Open (Elven) 0067 <gen>
- -------- Apartment 2 --------
- Set DoorDestClosed[2] = Gate Closed (Elven) 0084 <gen>
- Set DoorDestOpen[2] = Gate Open (Elven) 0128 <gen>
- -------- Apartment 3 --------
- Set DoorDestClosed[3] = Gate Closed (Elven) 0144 <gen>
- Set DoorDestOpen[3] = Gate Open (Elven) 0139 <gen>
- -------- Apartment 4 --------
- Set DoorDestClosed[4] = Gate Closed (Elven) 0152 <gen>
- Set DoorDestOpen[4] = Gate Open (Elven) 0149 <gen>
-
For each (Integer A) from 0 to 10, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DoorDestClosed[(Integer A)] Not equal to No destructible
- DoorDestOpen[(Integer A)] Not equal to No destructible
-
Then - Actions
- Animation - Play DoorDestOpen[(Integer A)]'s death alternate animation
- Destructible - Make DoorDestOpen[(Integer A)] Invulnerable
- Destructible - Hide DoorDestOpen[(Integer A)]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
Attachments
Last edited: