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!
I'm making a map right now (duh) and I want to put the Protoss Pylon can't-build-out-of-it's-range effect in, but before doing it I want to know the best way. Clearly the VERY best would just use blight that only the Pylon generates, but I'm already using it (for the Zerg) so it has to be something different.
I already have a pylon effect, a model. Is there any way to make it only show up for one player? Bearing in mind this is a "melee" style map, so variables are a no no.
cant u make a blight that doesnt change terrain looks? maybe give a selection point model and make it as big as the range it gives power, attach it to the model? although b visible to all. or make a trigger when its selected to cast an aoe that does no dmg but hits area of effect of range of power but that doesnt answer how to give power... maybe its way of giving power will b brilliance aura when buildings need mana to work and no natural mana regeneration. make triggers for the buildings for whenever u start research on a building it checks for mana and no mana cancels research?
Not sure if this is possible, but my guess of what I would try if I had to was to set a different terrain with the skin type thing for the psi, and have a trigger that different terrain blight =/. Or just another terrain in general. But like I said, not sure if that's possible.
Variables are a nono? Lol, this plain afirmation simply makes me laugh. How do you expect to enhance your map with complicated features if you don't use variables? Are you refering to instanceability? Now that's something different. Using JASS you can overcome this problem.
And yes, it is possible to execute a piece of code for only one player. But be careful about one thing: desyncs. When multiple players share different global information (I'll give you an example in a moment) then some get disconnected (I don't know more about this area, as I've never programmed for multiplayer). So be careful! The example: consider that player 1 has a unit with 100 life. However, locally, its life was modified to 300. If the unit receives 150 damage, for player 2, for example, the unit would be dead. But since for player 1 the unit had more life, it will be alive. Boom! Desync!
There is a function that can allow you to make the "only for one player" code above. You are going to need JASS for this though.
JASS:
native function GetLocalPlayer takes nothing returns player
How to use it? Pretty simple as well.
JASS:
local player p //set pylon player here
if (GetLocalPlayer() == p) then
call CreateUnit(p, PylonModel(), x0,y0,0)
endif
Be careful! Unit must have locust! And even this could cause desync, as the unit is global information. However, I know one thing for sure: Unit vertex coloring can be locally modified. So create the unit perhaps globally, and if the local player is NOT the one with the pylon power, set the coloring's alpha to 0 (or was it 255? Can't remember exactly, invisible anyway).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.