| 08-10-2006, 05:15 AM | #1 |
Can images be invisible? |
| 08-10-2006, 05:19 AM | #2 |
No, they cannot. Removing the image will still leave a text when moving the mouse over the buff. However, it is known that buffs do not stack. Sometimes it is a good idea to add the same buff to multiple spells (if they need to be cast on the same unit for the same spell) and so, they won't stack and you will have only one buff. That's the best I know. ~Daelin |
| 08-10-2006, 05:24 AM | #3 |
Actually I would like my ability to spawn an image that is invisible to the enemies and follows that target for some duration. |
| 08-10-2006, 11:16 AM | #4 |
Images cant have the Invisable ability. They cant use any ability, unless you set them to use some, but you still wont be able to use Perminant Invisabily. All you have to do, to hide it from a player, is use this: JASS:function HideUnitForPlayer takes unit whichUnit, player whichPlayer returns nothing if(GetLocalPlayer()==whichPlayer)then call ShowUnit(whichUnit, false) endif endfunction function ShowUnitForPlayer takes unit whichUnit, player whichPlayer returns nothing if(GetLocalPlayer()==whichPlayer)then call ShowUnit(whichUnit, true) endif endfunction function HideUnitForEverybodyButPlayer takes unit whichUnit, player whichPlayer returns nothing if(GetLocalPlayer()!=whichPlayer)then call ShowUnit(whichUnit, false) endif endfunction function ShowUnitForEverybodyButPlayer takes unit whichUnit, player whichPlayer returns nothing if(GetLocalPlayer()!=whichPlayer)then call ShowUnit(whichUnit, true) endif endfunction They should work nicely, i just whipped em up, but i might have a spelling mistake somewhere. Put them in your main map script. Lets say, you wanted only the caster to see the unit. Do something like: Event: unit starts effect of ability Action: Custom Script: JASS:call HideUnitForEverybodyButPlayer(GetSpellAbilityUnit(), GetOwningPlayer(GetSpellAbilityUnit())) EDIT: Forgot the brackets after GetLocalPlayer... |
| 08-10-2006, 11:56 AM | #5 |
ShowUnit() with localplayer desync if im not mistaken. and JASS:function HideUnitForEverybodyButPlayer takes unit whichUnit, player whichPlayer returns nothing if(GetLocalPlayer()!=whichPlayer)then call ShowUnit(whichUnit, false) endif endfunction this doesnt really make any sense. since its still only hiding/showing for one player.. not Everybody (as the function name says) edit: same goes for ShowUnitForEverybodyButPlayer() :) |
| 08-10-2006, 12:18 PM | #6 |
ShowUnit is the opposite of hide unit, correct? That will desync. Best you can do is vertex colourings. Or make a dummy illusion that is actually a real unit. |
| 08-10-2006, 01:05 PM | #7 |
hide unit is yet another lame function made by blizzard: JASS:function ShowUnitHide takes unit whichUnit returns nothing call ShowUnit(whichUnit, false) endfunction |
| 08-10-2006, 01:12 PM | #8 |
Hiding the unit for local play will almost certainly desync. Would you not be able to create a dummy unit to cast invisibility on the images? |
| 08-10-2006, 02:24 PM | #9 |
Since when does hiding/showing a unit cause desync? I'v used the same method a few times and never found a problem. |
| 08-10-2006, 02:43 PM | #10 |
It can easily cause problems. When hidden, a unit doesn't take damage. So on one player's machine a unit could die, while on another it is still hidden (and therefore alive). See the problem? Hell, a unit could even cast spells on one players machine but not on another. |
| 08-10-2006, 05:05 PM | #11 |
no new handle no problem... it wont desync |
| 08-10-2006, 06:13 PM | #12 |
Desyncs aren't only caused by handles created locally, any state shared between two instances of the game but is different for each will cause a desync. The only asynchronous change in data that should not be an issue is that which only affects one game and nothing shared between any, like text messages or multiboards. Limiting desyncs to handles created for one machine is an implication that would mean, like blu said, units could be dead for one game but alive for another or a unit could be in several places at once and have several different life values; and that's just units. Is it possible that hiding a unit means it does not appear targettable, is unselectable, and isn't drawn? Unless I'm mistaken hidden units can still perform actions and have their states changed without any issues. |
| 08-10-2006, 06:19 PM | #13 |
Not just targetable, it also prevents the unit from taking damage from AOE spells, so it would surelly desync. That's possible not the same with HideItem which might work for Local Player, cause I've seen it is even possible to pick up hidden items using orders. |
| 08-10-2006, 07:03 PM | #14 |
But how is windwalk made then? I thought windwalk just uses the Hide/Show player in GetLocalPlayer block, if not, how do they do it? Do they not use Jass for those abilities? |
| 08-10-2006, 07:09 PM | #15 |
Windwalk uses invisibility, that's why you can use sentry wards or some other detector to counter it. |
