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-24-2002, 10:09 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Attach?

I saw on 2001 those NPCs that are like elevators. They are on the sides of the mountains and stuff and you step on them and it carrys you up. I know this must use attachplayertoobj pr whatever but is there anyway to do this on a free server?
Reply With Quote
  #2  
Old 01-24-2002, 10:32 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
NPC Code:

if (playertouchsme) {
disabledefmovement;
attachplayertoobj 0,npcs[0].id;
for (i=y; i<desiredy; i++) {
y+=whateveramount; }
}
if (y==desiredamount) {
detachplayerl }
}



this is a rough script
[/code]
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #3  
Old 01-24-2002, 10:37 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
isnt that only allowed for p2p though?
Reply With Quote
  #4  
Old 01-24-2002, 11:01 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
i believe so, im not sure
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #5  
Old 01-24-2002, 11:24 PM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
dammit
Reply With Quote
  #6  
Old 01-24-2002, 11:34 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
NPC Code:

if(playerenters){
timereverywhere;
drawunderplayer;
this.y={5,15}; // {starty,endy}
//getdir to know if it goes first up or down
if(this.y[0] > this.y[1]){this.dir={0,2};}
else {this.dir={2,0};}
this.speed=.5; //speed elevator is moving
this.active=0;
if(isleader){y=this.y[0];}
}

if(playertouchsme){
setani idle,; //Normally u can see the walking gani
this.active=1;
timeout=.05;
}

if(timeout){
if(this.active > 0){
//only if using it
if(this.active==1){
freezeplayer .05;
playerx=x+(width/2-1.5);
playery=y+(height/2-2);
}
moving();
timeout=.05;
}
}

function moving() {
if(this.active==1){
if(abs(this.y[1]-y) > 0){y+=vecy(this.dir[0])*this.speed;}
else {this.active=2;}
}

if(this.active==2){
if(abs(this.y[0]-y) > 0){y+=vecy(this.dir[1])*this.speed;}
else {this.active=0;}
}
}



should be easy to edit it ^_^
__________________
No Webhost at the moment
Reply With Quote
  #7  
Old 01-25-2002, 12:39 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
THAT KICKS ASS!
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 08:29 AM.


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