Walk underneath and ontop?
I'm trying to make a castle wall gate. I want it to be so that the player can enter the castle by walking under the wall, but I also want it to be so that when the player walks on top of the wall and can walk on top of the same exact place.
So if the player enters the image from the right/left, they can walk on top of it. But if they enter from the top/bottom, they walk underneath it. |
You can achieve the effect using setshape2, and the appropriate drawing functions depending on the location and direction the player is heading.
|
You can try attachplayertoobj() but as far as I know there's no easy way to do it without some cheating.
|
I've been able to accomplish this but the downfall is it would only look correct to the current player and not others.
My method involved 3 NPCs two npcs would adjust a custom var like client.walkLayer and if it was 0 i would have the 3rd NPC draw above the player and if it was one I have it draw below the player. But since this is done client side it only shows correctly to the current player. I did this long ago and I can think of a few ways to improve it now. But, I don't know any sure fire way to do it. |
Sure would be nice if we had this as a scripting command or something we could set in the level editor
|
Am I missing something or is this almost exactly what Stefan invented attachplayertoobj for
|
Attaching the player is the usual way to do stuff like this, but it's not perfect. A player 'below' who is not attached could block the player 'above'. This is yet another situation where controlling whether or not other players block would be useful!
|
All times are GMT +2. The time now is 12:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.