- Joined
- Feb 11, 2008
- Messages
- 809
I am making a new combat system to mimic the one in the pokemon games so far it is working out quite well and is looking great but for some reason whenever i run my test trigger for the first time it lags for like 5 seconds before you can use your arrow keys and i cant figure out why. heres my triggers;
please and thank you if someone can help me figure this out!
also the CombatText[] are all set in the map init trigger so you will not see them being set.
-
Combat Start
-
Events
-
Player - Player 1 (Red) types a chat message containing -test as An exact match
-
-
Conditions
-
Actions
-
Set TriggerPlayer = (Player number of (Triggering player))
-
Set InCombat[TriggerPlayer] = True
-
Set TargetPokemon[TriggerPlayer] = (Random unit from (Units owned by Player 5 (Yellow)))
-
Player Group - Remove (Triggering player) from TriggerPlayerGroup[0]
-
Player Group - Add (Triggering player) to TriggerPlayerGroup[1]
-
Cinematic - Turn cinematic mode On for TriggerPlayerGroup[1]
-
Cinematic - Enable user control for TriggerPlayerGroup[1]
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[0]. Modify duration: Add 0.00 seconds and Wait
-
Trigger - Add to Combat Controller <gen> the event (Player - (Triggering player) Presses the Left Arrow key)
-
Trigger - Add to Combat Controller <gen> the event (Player - (Triggering player) Presses the Right Arrow key)
-
Trigger - Add to Combat Controller <gen> the event (Player - (Triggering player) Presses the Down Arrow key)
-
Trigger - Add to Combat Controller <gen> the event (Player - (Triggering player) Presses the Up Arrow key)
-
Trigger - Add to Combat Option <gen> the event (Player - (Triggering player) skips a cinematic sequence)
-
-
-
Combat Controller
-
Events
-
Conditions
-
InCombat[(Player number of (Triggering player))] Equal to (==) True
-
-
Actions
-
Set TriggerPlayer = (Player number of (Triggering player))
-
-------- Moving Left --------
-
Custom script: if GetTriggerEventId() == EVENT_PLAYER_ARROW_LEFT_DOWN then
-
Set CombatIndex[TriggerPlayer] = (CombatIndex[TriggerPlayer] - 1)
-
Custom script: endif
-
-------- Moving Right --------
-
Custom script: if GetTriggerEventId() == EVENT_PLAYER_ARROW_RIGHT_DOWN then
-
Set CombatIndex[TriggerPlayer] = (CombatIndex[TriggerPlayer] + 1)
-
Custom script: endif
-
-------- Moving Down --------
-
Custom script: if GetTriggerEventId() == EVENT_PLAYER_ARROW_DOWN_DOWN then
-
Set CombatIndex[TriggerPlayer] = (CombatIndex[TriggerPlayer] + 2)
-
Custom script: endif
-
-------- Moving Up --------
-
Custom script: if GetTriggerEventId() == EVENT_PLAYER_ARROW_UP_DOWN then
-
Set CombatIndex[TriggerPlayer] = (CombatIndex[TriggerPlayer] - 2)
-
Custom script: endif
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Less than (<) 0
-
-
Then - Actions
-
Set CombatIndex[TriggerPlayer] = 0
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Greater than (>) 3
-
-
Then - Actions
-
Set CombatIndex[TriggerPlayer] = 3
-
-
Else - Actions
-
-
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 0
-
-
Then - Actions
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[0]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 1
-
-
Then - Actions
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[1]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 2
-
-
Then - Actions
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[2]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 3
-
-
Then - Actions
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[3]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
-
-
-
Combat Option
-
Events
-
Conditions
-
InCombat[(Player number of (Triggering player))] Equal to (==) True
-
-
Actions
-
Set TriggerPlayer = (Player number of (Triggering player))
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 0
-
-
Then - Actions
-
Animation - Play (First unit of group MainPokemon[TriggerPlayer])'s attack animation
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[0]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 1
-
-
Then - Actions
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[1]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 2
-
-
Then - Actions
-
Unit - Order TrainersHero[TriggerPlayer] to Human Blood Mage - Banish TargetPokemon[TriggerPlayer]
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[2]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CombatIndex[TriggerPlayer] Equal to (==) 3
-
-
Then - Actions
-
Set InCombat[(Player number of (Triggering player))] = False
-
Set CombatIndex[TriggerPlayer] = 0
-
Cinematic - Turn cinematic mode Off for TriggerPlayerGroup[1]
-
Player Group - Remove (Triggering player) from TriggerPlayerGroup[1]
-
Cinematic - Send transmission to TriggerPlayerGroup[1] from a (Triggering player) (Unit-type of TrainersHero[TriggerPlayer]) named (Name of TrainersHero[TriggerPlayer]) at (Center of (Playable map area)): Play No sound and display CombatText[3]. Modify duration: Add 0.00 seconds and Wait
-
-
Else - Actions
-
-
-
-
also the CombatText[] are all set in the map init trigger so you will not see them being set.