Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Walk underneath and ontop? (https://forums.graalonline.com/forums/showthread.php?t=134261769)

MattKan 01-20-2011 01:42 AM

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.

fowlplay4 01-20-2011 01:47 AM

You can achieve the effect using setshape2, and the appropriate drawing functions depending on the location and direction the player is heading.

DrakilorP2P 01-20-2011 02:00 AM

You can try attachplayertoobj() but as far as I know there's no easy way to do it without some cheating.

MrOmega 01-20-2011 03:40 AM

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.

smirt362 01-20-2011 05:26 AM

Sure would be nice if we had this as a scripting command or something we could set in the level editor

Loriel 01-20-2011 05:57 AM

Am I missing something or is this almost exactly what Stefan invented attachplayertoobj for

Lance 01-20-2011 06:00 AM

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 11:33 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.