- Joined
- Jul 31, 2012
- Messages
- 2,217
is there a way to make a unit appear only for its allies (Reject invisibility)
if IsPlayerAlly(GetLocalPlayer(), GetOwningPlayer(GetSpellAbilityUnit())) then
call CreateUnit(player, typeId, x, y, angle)
endif
JASS:if IsPlayerAlly(GetLocalPlayer(), GetOwningPlayer(GetSpellAbilityUnit())) then call CreateUnit(player, typeId, x, y, angle) endif
Just show me how to make local player enemy force of owner of casting player and +rep if you do
That solution was used in that thread .shadowvzs said:vertex color with getlocalplayer
There was a thread like this very recently, do try searching for it next time. Before creating a thread.
That solution was used in that thread .
Here's my post on it.
It makes a unit invisible (or visible) for whoever you want.
I made the thing you made
didn't work
firstly i made exactly how appocalypse said
secondly just tell me how to post my trigger
tag
- blabla = blabla ^ 2
this will however not work for all units correctly, for example golems.
I undestand that this is maybe only desync safe method but it still has the disadvantage of setting units vertex colors to 100% 100% 100% but not all units have 100 100 100 vertex colors(several war golems(the red one I believe) has different value etc)
at end of the trigger
- Set FireStrike_Target = (Target point of ability being cast)
- Unit - Create 1 Flame strike first for "Triggering Player" at "FireStrike_Target" facing Default building facing degrees
useing wait could break ur system also because the target position/Fire_Elemental_FireStrike variables will be ovewrited if will be casted bt someone else this ability in next 3sec after u casted it, use local variable
- Custom script: call RemoveLocation(udg_FireStrike_Target)
also change Player 1 to trigger player if u want apply to any unit or it is single player map?
unit grouyp also got leak and use tag
also change Player 1 to trigger player if u want apply to any unit or it is single player map?
unit group also got leak and use tag
Stop asking questions that I have already covered (in this same thread even) .but now ||||the unit is totally made of particals||||
What to do
The trigger should remain almost exactly the same, except that you're not changing the fly height (and not the vertex coloring).In that case, you might want to try using fly height (have the unit have a negative fly height by default, then raise it for the local player). I hope that works.
Might I perhaps convince you to use 3 temporary locations in total for all your triggers?
This means that instead of the variable "FireStrike_Target", you'll have "TempLoc1" (and "TempLoc2" and "TempLoc3" in addition to that). You will never need more than that.
By doing that, you will save a lot of variables (having 3 locations total instead of 1-2 per spell).
You can still make it work by 'converting it to a local' at the start of the trigger (I'll probably have to explain this ).
First off: you're not actually converting it to a local. That was a lie .
But it simplifies the explanation, so let's stick with that.
Here's an example:
By doing this, "TempLoc1" cannot be overwritten anymore .
- Fire Strike
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Fire Strike (Elemental)
- Actions
- Custom script: local location udg_TempLoc1
- Set TempLoc1 = (Target point of ability being cast)
- Wait 5.00 seconds
- Unit - Create 1 unit at TempLoc1
- Custom script: call RemoveLocation(udg_TempLoc1)
- Custom script: set udg_TempLoc1 = null
If that spell is cast 10 times within 5 seconds, all those locations will still be correct! (Normally, 10 units would be created at the last location).
Frees up some variables and it's pretty clean, too.
Stop asking questions that I have already covered (in this same thread even) .
The trigger should remain almost exactly the same, except that you're not changing the fly height (and not the vertex coloring).
I'm sorry if this sounds rude, but did you even try this yourself? You can't expect everyone to do stuff for you, even after they explain how you can do this.DotCa said:show me for the flying height
I'm sorry if this sounds rude, but did you even try this yourself? You can't expect everyone to do stuff for you, even after they explain how you can do this.
Sure, it'd be faster, but it's for the best if you actually did something yourself .
What you need to know for this to work, is that you cannot change a unit's flying height to something negative by triggers.
So the default has to be negative, and then you need to revert that to a flying height of 0 (triggered) for the players who should be able to see the unit.
If you start from the trigger I gave you in my second post here and modify it, you should be able to work it out.
Then why don't you show me what you've got? Then I can tell you where you went wrong and you will learn from your mistakes.I tried to make the flying height and when i failed i posted that i needed help
This thing will desync!!!
Do you know what this means? It means that the unit will rise to a flying height of 3000 (which is way too high, you wouldn't be able to see a unit at that height either) over 3000 seconds (almost an hour).
- Animation - Change (Last created unit) flying height to 3000.00 at 3000.00
Simply said: when 2 players are receiving different information, the game will be split into 2 different states.Can someone explain what desync means
[Checked]Flying unit
the unit didn't moveheight 0.00 at 0.00
the unit is still not movingMade it height 1000.00 at 0.00 then 1000.00 at 1.00
- Custom script: if IsPlayerAlly(GetLocalPlayer(), Player(2)) then
Ah, wait a second!
With "Player(2)", do you mean Blue or Teal?
In JASS: Player(0) = Red, Player(1) = Blue, Player(2) = Teal.
For scaling special effects, you can use the model dummy.mdx as a base unit (it's a very common model, seen in a lot of maps).
Attach the special effect to the chest of that dummy (scale of the dummy can be changed through triggers or in the object editor).
Special effects can be shown for a single player in the same way the vertex coloring works: use a temporary string, set it to <empty string> at first and within the local-block, set it to the special effect you want to show.
Outside the local block, create the effect.
You don't remove the special effect, so it's still attached to the corpse of the dummy.
Always remove special effects (and then it will still play the animation, so you're better off removing the dummy as well).
I recently realized something, couldn't we hide the unit for specific players?
Ok no problem since the unit will be an effect and won't move or attack