(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 04-29-2008, 11:26 PM   #1 (permalink)

User
 
Join Date: Aug 2006
Posts: 117

LazyCoder is an unknown quantity at this point (0)


Objects only a certain player can see

Hi, is there any way to make a unit only visible to a certain player?

I figured one way would be to make the unit invisible, so only the player that owns it could see it, but that also makes it so the player can see through it. (I need it to be 100% opaque to a certain player, and 0% opaque to all others.)
LazyCoder is offline  
Old 04-29-2008, 11:46 PM   #2 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


Quote:
Originally Posted by LazyCoder View Post
Hi, is there any way to make a unit only visible to a certain player?

I figured one way would be to make the unit invisible, so only the player that owns it could see it, but that also makes it so the player can see through it. (I need it to be 100% opaque to a certain player, and 0% opaque to all others.)
I'd like to know if this were possible. And then if this was crash free.
Vegavak is offline  
Old 04-30-2008, 12:10 AM   #3 (permalink)
 
The Twilight's Avatar

Twilight's Emissary
 
Join Date: Apr 2008
Posts: 51

The Twilight has little to show at this moment (1)


It isn't possible. Now, I say this without trying it with variables, but nothing in the triggers menu says Hide Unit from Player.
__________________
The Twilight is offline  
Old 04-30-2008, 12:28 AM   #4 (permalink)
 
Saishy's Avatar

Half-Dragon
 
Join Date: Mar 2008
Posts: 678

Saishy has little to show at this moment (27)Saishy has little to show at this moment (27)Saishy has little to show at this moment (27)


Would be awesome if this was possible.
__________________
Map: Anime Brawl
Terrain: IIIIIIIIII
Triggers: IIIIIIIIII
Heroes: IIIIIIIIII
Spells/Items: IIIIIIIIII
Until Beta: IIIIIIIIII
Saishy is offline  
Old 04-30-2008, 01:17 AM   #5 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


The only way I can think would require disabling shared vision.
Vegavak is offline  
Old 04-30-2008, 03:47 AM   #6 (permalink)

User
 
Join Date: Aug 2006
Posts: 117

LazyCoder is an unknown quantity at this point (0)


Quote:
Originally Posted by Vegavak View Post
The only way I can think would require disabling shared vision.
Ah, well unfortunately, the unit has to be in view of all the players.

I was trying to create a background that would be relative to the player's camera.
LazyCoder is offline  
Old 04-30-2008, 11:51 AM   #7 (permalink)
 
h3k241's Avatar

"A Variable"
 
Join Date: Dec 2007
Posts: 132

h3k241 has a little shameless behavior in the past (-3)


Quote:
Originally Posted by LazyCoder View Post
Hi, is there any way to make a unit only visible to a certain player?

I figured one way would be to make the unit invisible, so only the player that owns it could see it, but that also makes it so the player can see through it. (I need it to be 100% opaque to a certain player, and 0% opaque to all others.)
Try making the unit invisible and then create a hidden tower or very very small tower that no one can see and then place Magic Sentry then set the range of Magic sentry into 9999999999999999999999...

[noinipOyMgniviGtsuJ]
h3k241 is offline  
Old 04-30-2008, 02:01 PM   #8 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


Quote:
Originally Posted by h3k241 View Post
Try making the unit invisible and then create a hidden tower or very very small tower that no one can see and then place Magic Sentry then set the range of Magic sentry into 9999999999999999999999...

[noinipOyMgniviGtsuJ]
Depending on how many computers you're using, this is possible. But it would be limited by the amount of players using the invisible thing, and the truesight thing.

Basically, you'd temporarily share vision with neutral victim or extra, and have a truesight unit in the map for that neutral, with infinite sight range. Then remove shared vision when done.

The only downside of this would be that, if you have any other detection, or invisible things, it will not work as well.
Vegavak is offline  
Old 04-30-2008, 02:23 PM   #9 (permalink)
 
wd40bomber7's Avatar

Starcraft2 Fan
 
Join Date: Aug 2006
Posts: 960

wd40bomber7 is on a distinguished road (70)wd40bomber7 is on a distinguished road (70)


As far as I know this is easily possible.

function HideUnitForPlayers takes force r, unit g returns nothing
local integer s = 0
    if IsPlayerInForce(GetLocalPlayer(),r) then
        set s = 0
    else
        set s = 255
    endif
    call SetUnitVertexColor(g,255,255,255,s)
endfunction

This uses the minimal (and shortest) local operations. I might have reversed the 255 and zero though. (Meaning unit will be visible when supposed to hidden and hidden when supposed to be visible.)

Try it out, it should work.
__________________
I can help you.......... Maybe......
Give Rep to those that help you!

I'm back! My computers been finished.

Last edited by wd40bomber7; 05-01-2008 at 01:06 AM..
wd40bomber7 is offline  
Old 04-30-2008, 03:02 PM   #10 (permalink)
 
emperor_d3st's Avatar

Vault Dweller
 
Join Date: Apr 2008
Posts: 1,315

emperor_d3st has little to show at this moment (51)


I'm 98% sure that this will desync the game, wd40bomber7.
__________________
"War, war never changes.."
emperor_d3st is offline  
Old 04-30-2008, 10:52 PM   #11 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


Quote:
Originally Posted by wd40bomber7 View Post
As far as I know this is easily possible.

function HideUnitForPlayers takes force r, unit g, returns nothing
local integer s = 0
    if IsPlayerInForce(GetLocalPlayer(),r) then
        set s = 0
    else
        set s = 255
    endif
    call SetUnitVertexColor(g,255,255,255,s)
endfunction

This uses the minimal (and shortest) local operations. I might have reversed the 255 and zero though. (Meaning unit will be visible when supposed to hidden and hidden when supposed to be visible.)

Try it out, it should work.
You did reverse the 255 and zero. 0 = no color. 255 = full color.

Quote:
Originally Posted by emperor_d3st View Post
I'm 98% sure that this will desync the game, wd40bomber7.
And it will desync the game and ruin multiplay. =(
Vegavak is offline  
Old 04-30-2008, 10:57 PM   #12 (permalink)

User
 
Join Date: Aug 2006
Posts: 117

LazyCoder is an unknown quantity at this point (0)


When a unit is invisible, they are compeltely invisible to all other players, but visible to the owner, but it's transparent. Is there any way to change the semi transparency value?

I'm trying to make a side scroller map (kind of like that soldiers map) but I'm trying to get a sky background into the map, and I plan on having a plane with a sky texture on it, and I'll set the position to something to do with the player's camera, but it would look a bit odd to see another players sky floating around.
LazyCoder is offline  
Old 04-30-2008, 11:09 PM   #13 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


Quote:
Originally Posted by LazyCoder View Post
When a unit is invisible, they are compeltely invisible to all other players, but visible to the owner, but it's transparent. Is there any way to change the semi transparency value?

I'm trying to make a side scroller map (kind of like that soldiers map) but I'm trying to get a sky background into the map, and I plan on having a plane with a sky texture on it, and I'll set the position to something to do with the player's camera, but it would look a bit odd to see another players sky floating around.
God. You just made me want to make a Metal Slug map. Hahaha
Vegavak is offline  
Old 04-30-2008, 11:19 PM   #14 (permalink)
 
wd40bomber7's Avatar

Starcraft2 Fan
 
Join Date: Aug 2006
Posts: 960

wd40bomber7 is on a distinguished road (70)wd40bomber7 is on a distinguished road (70)


This won't desynch. Why? Because it has no effect on game-play. Enemies can still see & shoot at the unit. It only effects alpha of a unit. (Meaning it still reacts the same both ways) Because I perform the same amount of operations for all players, theres no chance that will desychn either.

I'll test it within 2 hours.
__________________
I can help you.......... Maybe......
Give Rep to those that help you!

I'm back! My computers been finished.
wd40bomber7 is offline  
Old 04-30-2008, 11:52 PM   #15 (permalink)
 
Vegavak's Avatar

¹²³ ¹²³ ¹²³ ¹²³
 
Join Date: Mar 2006
Posts: 666

Vegavak is on a distinguished road (65)Vegavak is on a distinguished road (65)


Quote:
Originally Posted by wd40bomber7 View Post
This won't desynch. Why? Because it has no effect on game-play. Enemies can still see & shoot at the unit. It only effects alpha of a unit. (Meaning it still reacts the same both ways) Because I perform the same amount of operations for all players, theres no chance that will desychn either.

I'll test it within 2 hours.
If it doesn't desync, the only thing I'd say is it's still selectable, has a HP bar, and can be attacked.

So how are you gonna test it with multiplay?
Vegavak is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a player slot unavailable & titles above player slots MistAssass World Editor Help Zone 3 03-16-2008 09:14 AM
Maximum Amount of Objects DredLord2 World Editor Help Zone 16 08-03-2007 03:31 PM
Stacking Objects SilverSong World Editor Help Zone 1 06-23-2007 03:55 AM
RA2 Objects MR. FJ Requests 2 10-16-2005 11:12 PM
RA2 Objects MR. FJ Modeling & Animation 2 01-02-1970 02:40 AM

All times are GMT. The time now is 05:54 AM.






Your link here 
Horoscopes | Internet Advertising | Modded Xbox | Hotels in Rome | Guitar Lessons
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle