Does using the function "Triggering Player" cause lag?

J3LADE

New Member
Reaction score
7
Does using the function "Triggering Player" cause lag?

Because i have a trigger that is very simple but as soon as it comes into action it causes the game to freeze for about 2-3sec on my computer. (Which is pretty fast so for anyone with a lesser computer i don't want them to drop or server split)

Heres the trigger:
Code:
Events
    Dialog - A dialog button is clicked for LoadorNewDialog
Conditions
    (Clicked dialog button) Equal to LoadorNewDialogButton[2]
Actions
    Unit - Create 1 Basic Mage for (Triggering player) at (Center of Start <gen>) facing Default building facing degrees
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
893
There is no reason that trigger should lag. Do any other triggers go off with the same event? Do you have any triggers that run when units enter the map?
 

J3LADE

New Member
Reaction score
7
nop just this one and the unit isn't even a custom model and has no custom icons either...

I know it shouldn't lag because ive used the same kind of thing before...
 

elmstfreddie

The Finglonger
Reaction score
203
Is the mage unit totally decked out with some sweet-ass effects?

Yeah I will stop talking like that.
But is he? Is the mage unit a normal kinda unit or is there something special about him..? (something about him is huge, some kinda strange model file...)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
893
The only thing I can think of is to add a wait before you create the unit. If that doesn't work, upload the map.
 

J3LADE

New Member
Reaction score
7
Nup the wait didn't work :(

Maybe if i tried it with another unit?

Edit: Changing unit didn't work... i'll try it by trying to refer to the triggering player a different way.

Edit 2: I can't find a worth while solution to not using Triggering Player :( maybe i should just let the lag stay but imagine what would happen if all 12 players clicked the dialog button at once 12 x 5sec = 1min of instense lag :O (Which is highly likely as the dialog is at the very beginning of the game)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
893
> Maybe if i tried it with another unit?

You could do that. By the way, when you used the wait, did the lag happen before or after the wait?
 

J3LADE

New Member
Reaction score
7
after the wait im pretty sure (kinda hard to tell when the wait is 1 sec and it's gonna lag for 5 sec.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Well you do have a leak there... Fix it as well as all the other leaks in your map and report if you got it.
 

J3LADE

New Member
Reaction score
7
yep 5sec lag after the 10 sec where i can't even move my mouse or do anything else on the computer until the 5 seconds has elapsed. :mad:

Edit: There are absolutely no other triggers acting at the same time as this trigger does so i really think it has something to do with triggering player.
 

J3LADE

New Member
Reaction score
7
JASS:
function Trig_Creating_Character_Conditions takes nothing returns boolean
    if ( not ( GetClickedButtonBJ() == udg_LoadorNewDialogButton[2] ) ) then
        return false
    endif
    return true
endfunction

function Trig_Creating_Character_Actions takes nothing returns nothing
    call TriggerSleepAction( 1.00 )
    call CreateNUnitsAtLoc( 1, &#039;H005&#039;, GetTriggerPlayer(), GetRectCenter(gg_rct_Start), bj_UNIT_FACING )
endfunction

//===========================================================================
function InitTrig_Creating_Character takes nothing returns nothing
    set gg_trg_Creating_Character = CreateTrigger(  )
    call TriggerRegisterDialogEventBJ( gg_trg_Creating_Character, udg_LoadorNewDialog )
    call TriggerAddCondition( gg_trg_Creating_Character, Condition( function Trig_Creating_Character_Conditions ) )
    call TriggerAddAction( gg_trg_Creating_Character, function Trig_Creating_Character_Actions )
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top