• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Can I hide/dodas/destribucle/unit for one player

Status
Not open for further replies.
Level 10
Joined
Aug 14, 2009
Messages
309
I have made map and it has many effects. So to someone will /fps go down and next to him will be ALt F4. So I want to he can enter text maybe something like ''-effectsoff'' and then will all high graphic effects be invisible only for him. Any way to do this.

I will +rep you only if works for me.

It is possible but quite complicated.

Wouldn't it just be easier to set graphics lower or reduce the amount of effects in your map?
 
Level 10
Joined
Aug 14, 2009
Messages
309
Then map will not be so cool xD. At least is is possible to make unit invisible for one player

I only know how to disable effects from showing for players in Jass.

JASS:
globals
    // Stores if players have effects disabled
    boolean array PlayersEffectsDisabled
endglobals

// This function should be an event action for Player types message
function PlayerEventTypesEffectsOff takes nothing returns nothing
    set PlayersEffectsDisabled[GetPlayerId(GetTriggerPlayer())] = true
endfunction

// Use this function instead of AddSpecialEffect for all your effects
function AddSpecialEffectEx takes string input, real x, real y returns nothing
    local string s = input
    local integer i = 0
    loop
        exitwhen i > 11
         // Checks if player has effects disabled
        if GetLocalPlayer() == Player(i) and PlayersEffectsDisabled[i] then
            set s = ""
        endif
    endloop    
    call AddSpecialEffect(s, x, y)
endfunction

If you want to check all players that have typed the input you should create something like this
 
Level 10
Joined
Aug 14, 2009
Messages
309
Man will this affect all players or only one and will this work if I just copy this because I am noob in vJASS

It can affect all players but if you're not known with Jass I don't think this solution will work for you, I told you it would be complicated ;)

The stuff I coded can only work if you create your effects in Jass self, not in GUI or by spells.

No really easy solution for this problem I'm afraid :(
 
Status
Not open for further replies.
Top