Special Effects with GetLocalPlayer() ?

Faust

You can change this now in User CP.
Reaction score
123
Since the only functions with Special effects I know of are DestroyEffect and CreateEffect, I suppose it's impossible, but I still need a workaround or something other ingenious.
I need to Hide/Destroy/Create (either of the three) special effects LOCALLY.
I can't really just replace them with dummy units, because many effects are attached to hands for example.

Please help me this is very important.
 

Exide

I am amazingly focused right now!
Reaction score
448
Not sure if I understand what you want.
I might've misunderstood you.

I made something similar:

JASS:

function CreateEffectLP takes string whateffect, real x, real y, player p returns nothing
    if GetLocalPlayer() != p then
        set whateffect = ""
    endif
    call DestroyEffect(AddSpecialEffect(whateffect, x, y))
endfunction


Not sure if that's what you want, though.
 

Faust

You can change this now in User CP.
Reaction score
123
What I want exactly, is to have a command that disables the triggering player's special effects.
I want to achieve that by adding the player to a group, and each time I create a special effect, have an if function to check if the GetLocalPlayer() is in the player group.
If the player is in the group remove or hide the effect (create would be nice too, I just put the if somewhere else).

The problem is, as I heard, creating or destroying things liek these increase/decrease handle count, which leads to server splits.

Does your code do that Exide? o_O Because I can't test it in multiplayer right now :\
 

Exide

I am amazingly focused right now!
Reaction score
448
No, my code don't desync.

I have no idea how to pick the correct effects to destroy, though. Maybe you can attach them somehow to the correct player?
 

Faust

You can change this now in User CP.
Reaction score
123
But your code shows teh effect to certain players, and not to the rest?
 

Exide

I am amazingly focused right now!
Reaction score
448
My code shows the effects to LocalPlayer only.
 

saw792

Is known to say things. That is all.
Reaction score
280
Yep, you're right, I just tested it myself. String id 0 returns null, string id 1 returns "".
 
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