Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Follow Player (https://forums.graalonline.com/forums/showthread.php?t=19912)

SSRobgeta 12-29-2001 11:49 PM

Follow Player
 
This may soon really stupid. but I never looked into it. How do I make something stop following a player with Followplayer comand?

AlexH 12-29-2001 11:52 PM

set the x and y co-ordinates
and if your using it for something online the followplayer command wont work

SSRobgeta 12-29-2001 11:56 PM

Quote:

Originally posted by AlexH
set the x and y co-ordinates
and if your using it for something online the followplayer command wont work

\
Then what could I do?

AlexH 12-29-2001 11:57 PM

make your own follow player script

SSRobgeta 12-30-2001 12:03 AM

Ok, but is there any commands for P2P servers that I can add with NPC Server? Like canwarp?

AlexH 12-30-2001 12:05 AM

Quote:

Originally posted by SSRobgeta
Ok, but is there any commands for P2P servers that I can add with NPC Server? Like canwarp?
oh if your using NPC Server i dunno if followplayer works
i thought you were makin it non p2p where followplayer doesnt work
try asking a p2p owner if followplayer works with NPC Server
i no less than nothing about p2p scripting :(

SSRobgeta 12-30-2001 12:18 AM

Quote:

Originally posted by AlexH


oh if your using NPC Server i dunno if followplayer works
i thought you were makin it non p2p where followplayer doesnt work
try asking a p2p owner if followplayer works with NPC Server
i no less than nothing about p2p scripting :(

Ahh ok.

LiquidIce00 12-30-2001 04:50 AM

NPC Code:

if (playerenters&&!isweapon) { toweapons test; }
if (weaponfired) { timeout=.1; }
if (timeout) {
//here we say if the length of the array
//of stepx is 0 we need to make it an array
if (arraylen(stepsx)=0) { init(); }
if (playerx!=stepsx[0]||playery!=stepsy[0]) {
movearray();
record();
}
show();
timeout=.1;
}
function init() {
//here we set the stepsx array to 5
//remember it only goes up to 4
//since it starts at 0
setarray stepsx,5;
setarray stepsy,arraylen(stepsx);
}
function movearray() {
//here we move the array
//we start at 4 and we go
//to 1 , everytime moving it back one.
//for example if stepsx[3] is 3 and stepsx[2]
//is 4,
//it will set stepsx[4] to 3 and stepsx[3]
//to 4 and so on
for (this.i=arraylen(stepsx)-1;this.i>0;this.i--) {
stepsx[this.i]=stepsx[this.i-1];
stepsy[this.i]=stepsy[this.i-1];
}
}
function record() {
//record current player position to 0
stepsx[0]=playerx;
stepsy[0]=playery;
}

function show() {
showimg 1,shadoworb.gif,stepsx[arraylen(stepsx)-1],stepsy[arraylen(stepsy)-1];
}


Faheria_GP2 12-30-2001 08:44 AM

join followers;

have fun!

kyle0654 12-31-2001 12:18 AM

Look for my old script on here, it had three different ways for an NPC to follow the player, easily changeable by messing with a variable in the created portion.

SSRobgeta 12-31-2001 01:56 AM

Quote:

Originally posted by kyle0654
Look for my old script on here, it had three different ways for an NPC to follow the player, easily changeable by messing with a variable in the created portion.
Where would that be?

kyle0654 12-31-2001 02:08 AM

Quote:

Originally posted by SSRobgeta

Where would that be?

somewhere in this forum (or the other NPC one). I uploaded it a long time ago. Try doing a search.

SSRobgeta 12-31-2001 02:11 AM

Quote:

Originally posted by kyle0654

somewhere in this forum (or the other NPC one). I uploaded it a long time ago. Try doing a search.

Ok thx.


All times are GMT +2. The time now is 09:52 PM.

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