• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Advanced Show/Hide?

Status
Not open for further replies.
Level 7
Joined
Jun 27, 2014
Messages
227
I was wondering for two years already and finally came to ask - Is there a means to create an advanced Show/Hide trigger. What I'd like to do is create a 3 Story-Tall building (For Example), each with a floor of its own put in one singular place. No teleportation to another place on the map, it's right there within the doodad building.

To do this, I figured I'd have to use Show/Hide triggers in a subjective fashion, which is to say that one player can see the floor while the others cannot. For you, as you enter, you'd see the lobby and no other floor while the others outside see only the building and not you. If you're on the third floor, you see the outer walls of the building up to the third floor where you see the floor you are on - whereas the person in the lobby can only see the lobby and nothing up.

This was generally a concept I had in mind - the problem is, I want to ask if this is possible via triggers and how it would work? I feel like it would require Jass which I have no knowledge of, and I'm mediocre at best in terms of GUI.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
This is not possible in a multiplayer map; it will always desync the game. You can show different things for different players just fine, but the instant any one of those players interacts with anything that’s only visible to one of them (or is ordered to walk into a location that is unwalkable for one of them) it will desync.

Build the floors in different sections of the map.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
I would like to clarify what Pyrogasm said, because I think you are missing the main cause of the problem.
each with a floor of its own put in one singular place. No teleportation to another place on the map, it's right there within the doodad building.
This is a bigger problem than show/hide. Show/hide can be done with some tricks such as adding a specific animation to model for hiding it, settings scale/transparency for one player only... However, what you want to achieve requires physics stuff, (unlike display) which can not be handled locally. All players must use results of same physics calculation. W3 also does not support multi-height physics, I don't know what is the correct term but for example you can't have a bridge where units can walk below bridge and across it.
 
Level 6
Joined
Mar 7, 2011
Messages
124
Like pyrogasm and Ceday said, you can effect visibility for local player, but then you cannot depend on that visibility in anyway without first syncing it. I've been using SetUnitVertexColor in a LocalPlayer block to modify local visibility

What about if you built the floors in different sections of the map, but vertically align them or at a slight angle or w/e, and then wrap the whole thing in the building's exterior texture? Then break that exterior texture down into the pieces you want to show/hide. You could peel back the exterior texture for just the desired floor for the desired player. To the player, it'd appear very similar to how you're imaging, because it hides the fact that all levels are really on the same ground floor. This idea works well for the inside of the tower, but the outside of the tower would be problematic in that the 2nd+ floors should be in the air, but that's an optical illusion and they're really on the ground. You could deal with this but I'm not sure that it'll be within a scope you'll find enjoyable
 
Level 2
Joined
Nov 10, 2019
Messages
14
for the whole city you would just create 1 ground floor, and when a player enters stairs etc, just create the next floor for that single player, and make the ground floor invisible for that player. When he leaves again, remove the floor and make the ground floor visible again.
I suppose you could change the elevation height as the floors go upwards, untill you find the right height so it seems like you're walking again, and not in the air , since you want the walls to be taller as the reach the next floor.
Camera might be zoomed out too, so you get the same point of view for the current floor as you would for the ground floor, but the actual ground will look further away.

Make buildings walkable for everyone, but when floors are created for one player, make parts unwalkable for that one player.
I suppose it would take alot of work and leak covering to do this properly, since for every building you would have to add/remove, make invisible/visible or some stuff every time a player goes to next floor.

Not sure if this is for any help, but atleast a try.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
for the whole city you would just create 1 ground floor, and when a player enters stairs etc, just create the next floor for that single player, and make the ground floor invisible for that player. When he leaves again, remove the floor and make the ground floor visible again.
...
Make buildings walkable for everyone, but when floors are created for one player, make parts unwalkable for that one player.
It generally helps to read a thread before posting. The whole point of my comment in this thread is that the game state cannot be different for different players. Local pathing will break synchronicity when a player orders a unit to, for example, walk to a location that’s unpathable for them only. On their machine the unit stops when it can’t get any closer but on everyone else’s it continues to move to the destination point.
 
Level 2
Joined
Nov 10, 2019
Messages
14
It generally helps to read a thread before posting. The whole point of my comment in this thread is that the game state cannot be different for different players. Local pathing will break synchronicity when a player orders a unit to, for example, walk to a location that’s unpathable for them only. On their machine the unit stops when it can’t get any closer but on everyone else’s it continues to move to the destination point.

You could check if the unwalkable path is between the destination point and the unit, if so, find nearest corner of unwalkable path and force unit to move around it?
Then if the player tries to move unit outside the house when on another floor than the ground floor, force the unit to walk towards the stairs?

This could be a workaround to the unit stopping when trying to move through a unwalkable path
 
Level 6
Joined
Mar 7, 2011
Messages
124
You could check if the unwalkable path is between the destination point and the unit, if so, find nearest corner of unwalkable path and force unit to move around it?
Then if the player tries to move unit outside the house when on another floor than the ground floor, force the unit to walk towards the stairs?

This could be a workaround to the unit stopping when trying to move through a unwalkable path

I don't know man, that's even crazier than your original idea. That's similar to having parallel universes which overlap but dont interact, using WC to do it. At least you mentioned the need for a bit of extra logic to help units navigate these overlapping dimensions... Is there a reason you're thinking of for why having the different floors occupy the exact same physical space would be advantageous? I might just not be seeing your angle
 
Status
Not open for further replies.
Top