Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-02-2009, 04:20 AM
SwimChao SwimChao is offline
UN Manager
SwimChao's Avatar
Join Date: Feb 2009
Posts: 486
SwimChao is just really niceSwimChao is just really nice
Send a message via Skype™ to SwimChao
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)

__________________
People wake up hatin' and they ain't even brushed they teeth yet.
Reply With Quote
  #2  
Old 09-02-2009, 04:24 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #3  
Old 09-02-2009, 04:31 AM
SwimChao SwimChao is offline
UN Manager
SwimChao's Avatar
Join Date: Feb 2009
Posts: 486
SwimChao is just really niceSwimChao is just really nice
Send a message via Skype™ to SwimChao
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).
__________________
People wake up hatin' and they ain't even brushed they teeth yet.
Reply With Quote
  #4  
Old 09-02-2009, 04:36 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
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.
Reply With Quote
  #5  
Old 09-02-2009, 04:49 AM
SwimChao SwimChao is offline
UN Manager
SwimChao's Avatar
Join Date: Feb 2009
Posts: 486
SwimChao is just really niceSwimChao is just really nice
Send a message via Skype™ to SwimChao
Yeah, I was avoiding warping because it's so tacky looking.
__________________
People wake up hatin' and they ain't even brushed they teeth yet.
Reply With Quote
  #6  
Old 09-02-2009, 04:54 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by SwimChao View Post
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.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #7  
Old 09-02-2009, 07:38 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004 Send a message via Skype™ to Tolnaftate2004
Quote:
Originally Posted by Gambet View Post
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.

vv
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #8  
Old 09-02-2009, 07:42 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Tolnaftate2004 View Post
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.

vv

Haha, that's right. Just adds on to the list of problems you could run across.
Reply With Quote
  #9  
Old 09-02-2009, 10:34 AM
Umat Umat is offline
Banned
Join Date: Jul 2008
Location: Sweden
Posts: 412
Umat will become famous soon enough
I would have checked the players direction while the player entered the bridge.
Reply With Quote
  #10  
Old 09-02-2009, 12:52 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
All kind of NPCs like a bridge I've seen were using setshape or something, but that was quite complex o_o
Reply With Quote
  #11  
Old 09-02-2009, 01:32 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 19,993
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Send a message via AIM to Crono
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.
__________________
Reply With Quote
  #12  
Old 09-02-2009, 03:10 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Stefan used attachplayertoobj on 2k1 for this, so go nuts.
Reply With Quote
  #13  
Old 09-02-2009, 07:57 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Crono View Post
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.
Reply With Quote
  #14  
Old 09-02-2009, 07:59 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump


All times are GMT +2. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.