HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Reverse Invisibility?

04-29-2006, 07:36 PM#1
xXx-Tricky-xXx
Hey, im currently working on a first person shooter-like map due to requests from a map I made and sent to wc3sear.ch. But I seem to be having a problem. Ive pretty much got a good laid out system for movement ect, but Im having trouble with when you move around using arrow keys like forward, your unit flashes in the screen and it is quite annoying. I don't want to use any offset's because there are walls and buildings and even using 100 offset will result in seeing through walls.

At first, I decided I would make the units transparent so you wont see em flash in ur screen, and since the units slide instead of walk right now. And then creating dummy unit that will move around and act as a fake player's unit. But that would defeat the purpose as it also will be in the way.

So what Im asking is, is there a way to sort of reverse an invisible ability so that enemy see's you but you dont see your unit. Or someway that only certain players can see certain units.

Thanks in advance.
04-29-2006, 07:44 PM#2
Blade.dk
Yes, there is. It is even easy to do!

Trigger:
Actions
Set TempUnit = <unit>
Custom script: if GetLocalPlayer() == GetOwningPlayer(udg_TempUnit) then
Custom script: call SetUnitVertexColor(udg_TempUnit, 255, 255, 255, 0)
Custom script: endif

That should do it, of course be sure that you set TempUnit to all your units and do the following custom script actions everytime.

With a trigger like this, the unit will be invisible to it's owner, but all other players can see it.
04-29-2006, 08:03 PM#3
paidan_fain
And it won't disconnect? Thats kinda neat. Coarse the problem with this is then selection, shadows, and glows but those are easily fixable.
04-29-2006, 08:09 PM#4
Tim.
I used that for my FPS mod as well. Runs perfectly without DCing.
04-29-2006, 08:13 PM#5
Blade.dk
This method will only change the unit's color to make it 100% transparent == invisible, so it does not affect the game in any way that would make it disconnect.
04-29-2006, 09:31 PM#6
xXx-Tricky-xXx
o wow, thank you so much. This is EXACTLY what I needed. I really should try learning more JASS but i just cant, and I dont have long enough attention span to learn how. Sorta sucks. ;/

Again, thanks alot!


Hey Tim did you finish your FPS. Curious to see it. Mine right now the units sldie around looks a bit funky though. But it has many filters for like running around with a sniper rifle or assault rifle with crosshair, or zooming in and shooting people with a scope from 10,000 distance max, or with assault rifle you have an iron sight.