Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Over & Under an NPC? (https://forums.graalonline.com/forums/showthread.php?t=87730)

SwimChao 09-02-2009 03:20 AM

Over & Under an NPC?
 
My goal is to establish a way for a player to freely walk over, and under an NPC. I've seen it done before, namely on N-Pulse (near their Events Center).

What I'm currently working with requires full power of exploration from players, in a realistic sense. If I can figure out, or get help working this script out it will be a big step to executing that plan.

Any ideas?
(Ex. Walking across (from cliff to cliff), or under this bridge)


DustyPorViva 09-02-2009 03:24 AM

Only way I know how to do so is with attachplayertoobj()... I personally hate this method as it requires server communication; for example, a player will touch the bridge, attach to the bridge(therefor drawing the player on it, while other players can walk under it and the player), but that requires communication with the server. So the player will touch the bridge, keep walking, then when communication is finished, get warped BACK to the place they touched it. Same with walking off.

All other methods I have tried do not work as it's specific to the player, so for example while I may draw the NPC under the player so they can walk across the bridge, it may still be drawing OVER the player for other players, making me appear under it, even when I am on top.

SwimChao 09-02-2009 03:31 AM

I know that it was worked out on UN by checking ganis, but in this scenario specifically it obviously wouldn't work (without some form of ghetto rigging).

Gambet 09-02-2009 03:36 AM

Couldn't you just use drawoverplayer() and dontblock() whenever the player tries going under the bridge? Make it clientside so it doesn't affect anyone else. You could also change the alpha while the player is touching the bridge from underneath for the player to be able to see themselves move around.

You gotta understand that either way you do it you're bound to run into problems because if a player walks under the bridge while a player is walking through the bridge they're going to end up bumping into each other if it's a pk zone (unless you made an elevated bridge at a different z-axis than the player walking under it). This is why most servers with bridges just have the player automatically warp to the other side when it comes to walking under it.

SwimChao 09-02-2009 03:49 AM

Yeah, I was avoiding warping because it's so tacky looking.

Switch 09-02-2009 03:54 AM

Quote:

Originally Posted by SwimChao (Post 1520575)
Yeah, I was avoiding warping because it's so tacky looking.

Or move the player in a Gani (movie mode)/by script over it. Then have it not block and change the alpha of the image when walking under it like someone else suggested.

Tolnaftate2004 09-02-2009 06:38 AM

Quote:

Originally Posted by Gambet (Post 1520571)
Couldn't you just use drawoverplayer() and dontblock() whenever the player tries going under the bridge? Make it clientside so it doesn't affect anyone else.

This idea has merit but for anyone where the npc is drawing under them and another player is walking under the npc, it looks like the other player is walking across (on top) of it.

v:)v

Gambet 09-02-2009 06:42 AM

Quote:

Originally Posted by Tolnaftate2004 (Post 1520617)
This idea has merit but for anyone where the npc is drawing under them and another player is walking under the npc, it looks like the other player is walking across (on top) of it.

v:)v


Haha, that's right. Just adds on to the list of problems you could run across. :p

Umat 09-02-2009 09:34 AM

I would have checked the players direction while the player entered the bridge.

Soala 09-02-2009 11:52 AM

All kind of NPCs like a bridge I've seen were using setshape or something, but that was quite complex o_o

Crono 09-02-2009 12:32 PM

2009 and we still have no workaround for this? I remember seeing a solution years ago but I'm not sure how they did it.

Loriel 09-02-2009 02:10 PM

Stefan used attachplayertoobj on 2k1 for this, so go nuts.

DustyPorViva 09-02-2009 06:57 PM

Quote:

Originally Posted by Crono (Post 1520630)
2009 and we still have no workaround for this? I remember seeing a solution years ago but I'm not sure how they did it.

Good support for layers and attaching a player to a layer would be a great method for this... if only.

I've already noted the annoyances with attachplayertoobj.

Tigairius 09-02-2009 06:59 PM

I did one for Delteria Dev, but I don't know if they would be willing to share the script.

As said in this thread, just use attachplayertoobj; I don't recommend using dontblock and drawoverplayer/underplayer solely and that is because it would look odd if you see someone walking across a bridge but it would be draw over player for you since you wouldn't be on the bridge.

The best way to do it is attachplayertoobj and detachplayer. Of course, if we ever got properly working tile layers this would simply be done with a level editor and no complex NPCs involved.


All times are GMT +2. The time now is 01:17 PM.

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