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 02-04-2015, 06:38 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Bridge under/over player question

Hello

On Ol'West I'm trying to make a bridge which can be walked under and over depending on which direction you walk onto it from. I don't want to use attachtoobj. I was thinking more of a layer approach. I had hoped I could use player.layer but it doesn't seem to exist.



I made the bridge a separate graphic, and the rails are all separated as well. I was thinking I could put 4 radius detection npcs, one at each part of the bridge, and they'd detect if the player is there on the client side and change the layering and setshapes depending on where they enter from.

I can't get anything to work, and I really do not want to use attachtoobj because there's too many problems with other things like if the player enters their house or hops on a horse or something it could cause a mess. Also from my experience with attachtoobj on Delteria, I remember it causing everybody else to disappear when you're attached, which is complete trash.

Any ideas?
Reply With Quote
  #2  
Old 02-04-2015, 07:30 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
hello!

i personally accomplish this by using setshape2, with both a vertical and horizontal set of width/height/offsets
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #3  
Old 02-04-2015, 09:52 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
hello!

i personally accomplish this by using setshape2, with both a vertical and horizontal set of width/height/offsets
I'm completely aware of how to use setshape2, that's not my problem.

How do you make it so the image will show over the player for everyone if you walk under it and under the player if you walk over it? That's my problem.

I don't want players being shown above the bridge for some people and underneath for themselves or others, it needs to all display correctly.
Reply With Quote
  #4  
Old 02-04-2015, 10:04 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
The way I can think of working the best is changing the player's layer, if only that was possible..
Reply With Quote
  #5  
Old 02-05-2015, 02:20 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Others have done this by hiding the player altogether and showing gani's in place of the player I believe. I know I've made a bridge like this before and just as you said, I had the exact problem. It's because if you walk under the bridge you won't be seen and neither will the players on top of the bridge they appear under when your under, and vise-versa. Attaching player to the object is the easiest way to do it but I hear there is a lag issue when doing that.
Reply With Quote
  #6  
Old 02-05-2015, 05:29 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
Quote:
Originally Posted by scriptless View Post
Others have done this by hiding the player altogether and showing gani's in place of the player I believe. I know I've made a bridge like this before and just as you said, I had the exact problem. It's because if you walk under the bridge you won't be seen and neither will the players on top of the bridge they appear under when your under, and vise-versa. Attaching player to the object is the easiest way to do it but I hear there is a lag issue when doing that.
correct, though it is not really necessary to show a gani, you can simply leave the player as normal when they are above the bridge, and hide the player (ideally using alpha so you can retain gani sounds etc) when they are below the bridge
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #7  
Old 02-05-2015, 05:48 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
correct, though it is not really necessary to show a gani, you can simply leave the player as normal when they are above the bridge, and hide the player (ideally using alpha so you can retain gani sounds etc) when they are below the bridge
Setting a player's alpha in a script is only clientside and they won't be invisible to other players. The best way to do that would be to make a gani with the alpha value set in it, and set that gani as one of the player's attrs. Still, there would be a problem with them walking under the bridge. They would just go and disappear and it would look wrong.
Reply With Quote
  #8  
Old 02-05-2015, 09:22 AM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Honestly the best approach with out a terrible work around would be attach the player to the bridge. And for things such as warping while on the bridge you could always detect if there attached and detatch them. Few ways you could do this, my favorite method is onplayerleaves.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #9  
Old 02-06-2015, 05:29 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by MysticalDragon View Post
Honestly the best approach with out a terrible work around would be attach the player to the bridge. And for things such as warping while on the bridge you could always detect if there attached and detatch them. Few ways you could do this, my favorite method is onplayerleaves.
I know that would probably be the simplest way, though I don't want people disappearing like that when they get attached. If that wasn't a problem, we could easily detect if they left the bridge and disconnect them from it.

Edit: Actually, I think I may have figured it out. attachplayertoobj works differently on GMAPs, I don't think it hides players when using it there - I'll see.
Reply With Quote
  #10  
Old 02-06-2015, 06:16 AM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Quote:
Originally Posted by Alpho View Post
I know that would probably be the simplest way, though I don't want people disappearing like that when they get attached. If that wasn't a problem, we could easily detect if they left the bridge and disconnect them from it.

Edit: Actually, I think I may have figured it out. attachplayertoobj works differently on GMAPs, I don't think it hides players when using it there - I'll see.
Well I was addressing one of your concerns, If it wasn't a concern maybe you shouldn't of mentioned it. And with the other concern, you could always make it so they couldn't get on their horse when attached.

Quote:
like if the player enters their house or hops on a horse or something it could cause a mess.
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #11  
Old 02-06-2015, 02:52 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Me personally? I wouldn't bother. All the current methods look & act crap.

Add a level under the bridge, add some homeless guy there or something interactive.
__________________
Reply With Quote
  #12  
Old 02-20-2015, 07:14 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Quote:
Originally Posted by xAndrewx View Post
Me personally? I wouldn't bother. All the current methods look & act crap.

Add a level under the bridge, add some homeless guy there or something interactive.
That's exactly what I did.
Reply With Quote
  #13  
Old 02-23-2015, 02:12 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by Alpho View Post
That's exactly what I did.
you should make him /all orange and chase you if you don't give him some money.
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 04:58 AM.


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