Hello there everybody
I posted my 2 "somewhat" working triggers down below.
What i want to achieve is like the feeling of pokemon wild grass where you click and randomly move within this area and then at random "clicks!" or "intervals (while moving only)" to sometimes hit a "random encounter" which in this case is like a bandit attack (dont mind the mobs not being bandits).
also the random encounters can only happen while the "Party" mob is moving so that the party is safe while not on the move.
The ones i have here sort of works, but the issue i get with these are the fact that if i end up clicking the smart move button hella fast (as many people playing wc3 does) it sometimes loop the effect so when the "Party" mob is unpaused it instantly triggers another encounter and this can happen like 5 times in a row before i get to actively move the "Party" mob again
Any ideas, improvements and fixes are appreciated!
I posted my 2 "somewhat" working triggers down below.
What i want to achieve is like the feeling of pokemon wild grass where you click and randomly move within this area and then at random "clicks!" or "intervals (while moving only)" to sometimes hit a "random encounter" which in this case is like a bandit attack (dont mind the mobs not being bandits).
also the random encounters can only happen while the "Party" mob is moving so that the party is safe while not on the move.
The ones i have here sort of works, but the issue i get with these are the fact that if i end up clicking the smart move button hella fast (as many people playing wc3 does) it sometimes loop the effect so when the "Party" mob is unpaused it instantly triggers another encounter and this can happen like 5 times in a row before i get to actively move the "Party" mob again
Any ideas, improvements and fixes are appreciated!
-
Zone1HostileCritter
-
Events
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Unit-type of (Ordered unit)) Equal to Party
-
(Issued order) Equal to (Order(smart))
-
-
Actions
-
Set VariableSet RandomEncounterRoller = (Random integer number between 1 and 10)
-
Trigger - Run Zone1HostileCritterFight <gen> (checking conditions)
-
-
-
Zone1HostileCritterFight
-
Events
-
Conditions
-
RandomEncounterRoller Less than 5
-
-
Actions
-
Set VariableSet Zone1EncounterUnits = (Units in Zone1EncounterArea <gen>)
-
Unit Group - Pick every unit in Zone1EncounterUnits and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Neutral Hostile
-
-
Then - Actions
-
Unit - Remove (Picked unit) from the game
-
-
Else - Actions
-
-
-
-
Item - Pick every item in Zone1EncounterArea <gen> and do (Actions)
-
Loop - Actions
-
Item - Remove (Picked item)
-
-
-
Custom script: call DestroyGroup(udg_Zone1EncounterUnits)
-
Wait 0.10 seconds
-
Set VariableSet RandomEncounterRoller = 0
-
Unit - Pause PartyBus
-
Trigger - Turn on OrderToFight <gen>
-
Trigger - Turn on Zone1Treasuree <gen>
-
Unit - Create ((Random integer number between 0 and 2) + (NumberOfPlayers / 2)) Wisp for Neutral Hostile at Zone1BottomLeftSpawn facing Default building facing degrees
-
Unit - Create ((Random integer number between 0 and 2) + (NumberOfPlayers / 2)) Wisp for Neutral Hostile at Zone1TopLeftSpawn facing Default building facing degrees
-
Set VariableSet Zone1EncounterUnits = (Units in Zone1EncounterArea <gen>)
-
Unit Group - Pick every unit in Zone1EncounterUnits and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Neutral Hostile
-
-
Then - Actions
-
Set VariableSet Zone1MobCount = (Zone1MobCount + 1)
-
Game - Display to (All players) the text: (Mobs Left To Kill + (String(Zone1MobCount)))
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_Zone1EncounterUnits)
-
Wait 0.10 seconds
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Unit - Move PlayerHero[(Player number of (Picked player))] instantly to Zone1PCSpawn
-
Camera - Pan camera for (Picked player) to Zone1PCSpawn over 0.00 seconds
-
Selection - Select PlayerHero[(Player number of (Picked player))] for (Picked player)
-
-
-
-