Darimus
BattleForums Addict
Ok first off I have no clue what is going on with it... but I found out by trial and error that if I disable the Unit - Create (the hero) then it doesn't lag (You'll understand when you read the problem).
Now here's the problem. When anyone clicks the dialog button for the class they want to choose, if they are the first one to do it in the game, it hangs (frozen screen and mouse for all players and some lag afterwards) for about 10 seconds. The 2nd time you do it, it won't hang at all. And 3rd... and so on. Only the first time you do it, it hangs... and nothing different happens on the 2nd time or 3rd and on and on from the 1st time you do it.
Here's the trigger:
Now here's the problem. When anyone clicks the dialog button for the class they want to choose, if they are the first one to do it in the game, it hangs (frozen screen and mouse for all players and some lag afterwards) for about 10 seconds. The 2nd time you do it, it won't hang at all. And 3rd... and so on. Only the first time you do it, it hangs... and nothing different happens on the 2nd time or 3rd and on and on from the 1st time you do it.
Here's the trigger:
Code:
ClassConfirm
Events
Dialog - A dialog button is clicked for ClassConfirm
Conditions
(Clicked dialog button) Equal to ClassYes
Actions
Wait 0.50 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ConfirmClassNo[(Player number of (Triggering player))] Equal to 4
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerRace[(Player number of (Triggering player))] Equal to Avian
Then - Actions
Unit - Create 1 Avian Nightblade for (Triggering player) at (Position of Hero[(Player number of (Triggering player))]) facing (Facing of Hero[(Player number of (Triggering player))]) degrees
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop (Item carried by Hero[(Player number of (Triggering player))] in slot (Integer A)) from Hero[(Player number of (Triggering player))]
Hero - Give (Last dropped item) to (Last created unit)
Hero - Set (Last created unit) experience to (Hero experience of Hero[(Player number of (Triggering player))]), Hide level-up graphics
Unit - Remove Hero[(Player number of (Triggering player))] from the game
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Skip remaining actions
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerRace[(Player number of (Triggering player))] Equal to Mazan
Then - Actions
Unit - Create 1 Mazan Nightblade for (Triggering player) at (Position of Hero[(Player number of (Triggering player))]) facing Default building facing degrees
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop (Item carried by Hero[(Player number of (Triggering player))] in slot (Integer A)) from Hero[(Player number of (Triggering player))]
Hero - Give (Last dropped item) to (Last created unit)
Hero - Set (Last created unit) experience to (Hero experience of Hero[(Player number of (Triggering player))]), Hide level-up graphics
Unit - Remove Hero[(Player number of (Triggering player))] from the game
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Skip remaining actions
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerRace[(Player number of (Triggering player))] Equal to Nolath
Then - Actions
Unit - Create 1 Nolath Nightblade for (Triggering player) at (Position of Hero[(Player number of (Triggering player))]) facing Default building facing degrees
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop (Item carried by Hero[(Player number of (Triggering player))] in slot (Integer A)) from Hero[(Player number of (Triggering player))]
Hero - Give (Last dropped item) to (Last created unit)
Hero - Set (Last created unit) experience to (Hero experience of Hero[(Player number of (Triggering player))]), Hide level-up graphics
Unit - Remove Hero[(Player number of (Triggering player))] from the game
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Skip remaining actions
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerRace[(Player number of (Triggering player))] Equal to Orc
Then - Actions
Unit - Create 1 Orc Nightblade for (Triggering player) at (Position of Hero[(Player number of (Triggering player))]) facing Default building facing degrees
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Drop (Item carried by Hero[(Player number of (Triggering player))] in slot (Integer A)) from Hero[(Player number of (Triggering player))]
Hero - Give (Last dropped item) to (Last created unit)
Hero - Set (Last created unit) experience to (Hero experience of Hero[(Player number of (Triggering player))]), Hide level-up graphics
Unit - Remove Hero[(Player number of (Triggering player))] from the game
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Skip remaining actions
Else - Actions
Do nothing
Else - Actions
Do nothing