Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-26-2006, 06:54 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Setshape2 and attachplayertoobj ARGH

Oh boy two problems in one day. OK so im trying to make a passenger boat script. So a group of people can jump on and have a jolly good time exploring the ocean. Problem is everytime I get on the boat I get warped down a level except I can see still all the npcs and players in that same level.

PHP Code:
if (created) {
setstring this.level,#L,#v(x),#v(y);
setimg ship1.gif;
setshape 1,32,32;
this.isadummynpc true;
}
if (
playerchats) {
 if (
strequals(#c,destroy)) {
  
detachplayer;
  
sendtonc boat destroyed;
  
destroy;
  }
}

//#CLIENTSIDE
if (created) {
setshape2 1425, {
    
1111111111111111111111111111,
    
1111112222222222222222111111,
    
11111122222233222222111111,
    
1111222233333322221111,
    
11112203300330221111,
    
11112200000000221111,
    
1111220002222000221111,
    
1111220022332200221111,
    
1111220022332200221111,
    
11112200033000221111,
    
11112200033000221111,
    
11110002233220001111,
    
11110002233220001111,
    
1111220002222000221111,
    
11112200000000221111,
    
11112200000000221111,
    
1111222200000022221111,
    
1111222222222222222222221111,
    
1111222222222222222222221111,
    
1111112222222222222222111111,
    
1111111122222222222211111111,
    
1111111111222222221111111111,
    
1111111111112222111111111111,
    
1111111111111111111111111111,
    
1111111111111111111111111111, };
   }
   

if (
playertouchsme) {
  
setplayerprop #c,Jump in the water and Press A to leave!;
  
attachplayertoobj 0,id;
}

if (
timeout && playerattached){
  if (
keydown(6)){
    
detachplayer;
    
enabledefmovement;
    
setplayerprop #c,You disembark the boat.;
  
}
 if (!
playerx in |x,x+14|) {
  if (!
playery in |y,y+25|) {
    
playerx=x+6;
    
playery=y+14;
   }
  }
 }
timeout=.05
Edit:Another Update in script!
The Graphic im using is also attached.
My Problems Before and After pictures also included!
Help would be much appreciated!
Attached Thumbnails
Click image for larger version

Name:	ship1.gif
Views:	182
Size:	12.5 KB
ID:	35079   Click image for larger version

Name:	before.jpeg
Views:	209
Size:	81.6 KB
ID:	35096   Click image for larger version

Name:	after.JPG
Views:	191
Size:	96.6 KB
ID:	35097  
__________________
Quote:

Last edited by fowlplay4; 01-27-2006 at 05:11 AM.. Reason: Script Update
Reply With Quote
  #2  
Old 01-26-2006, 07:19 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
-set a flag serverside so the NPC isn't treated like a dummy NPC
-setshape2 is clientside
Reply With Quote
  #3  
Old 01-26-2006, 03:45 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Hmm im still having that warping problem...
I'll post some screens after school
__________________
Quote:
Reply With Quote
  #4  
Old 01-26-2006, 10:11 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
You still need some image/shape serverside.
Reply With Quote
  #5  
Old 01-27-2006, 12:47 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Hmmm.. It appears that this is one of those gmap problems.
__________________
Quote:

Last edited by fowlplay4; 01-27-2006 at 04:59 AM..
Reply With Quote
  #6  
Old 07-13-2007, 06:25 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Sorry to revive old threads but I'm having this exact same problem, anyone know how to fix it?
__________________
Reply With Quote
  #7  
Old 07-13-2007, 07:07 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Fixed now, apparently it only works for gmaps if you trigger the attach function serverside, however the delay needed to make the attachment causes a small jerking motion when your player attaches to the ship
__________________
Reply With Quote
  #8  
Old 07-13-2007, 09:41 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
adjust the player x y so it doesn't seem to be a jerking motion?
__________________
Deep into the Darkness peering...
Reply With Quote
  #9  
Old 07-13-2007, 10:18 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Angel_Light View Post
adjust the player x y so it doesn't seem to be a jerking motion?
Oh, my immature humor made me laugh...
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 07-13-2007, 12:52 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Hmm, making the player warp about a tile might reduce the effect, but I'm too lazy to do it now.
__________________
Reply With Quote
  #11  
Old 07-13-2007, 01:38 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by zokemon View Post
Oh, my immature humor made me laugh...
Least someone got it. and Invern, GET OFF YOUR LAZY ASS!!! Much Love!
__________________
Deep into the Darkness peering...
Reply With Quote
  #12  
Old 07-13-2007, 01:41 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Angel_Light View Post
Least someone got it. and Invern, GET OFF YOUR LAZY ASS!!! Much Love!
I think he meant other actions that involve jerking motion, WINK WINK.
__________________
Reply With Quote
Reply


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 09:04 AM.


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