Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   serverside follow (https://forums.graalonline.com/forums/showthread.php?t=51112)

ZeLpH_MyStiK 02-15-2004 05:02 AM

serverside follow
 
Hey guys, i've run into a problem and need your advise. I scripted a follow script using arrays that record the players previous steps and used the move command with it. However, with a minimum of .1 timeout, it wasnt smooth. Got any suggestions?

haunter 02-15-2004 05:05 AM

Minimum timeouts are 0.05 :)

ZeLpH_MyStiK 02-15-2004 05:18 AM

Quote:

Originally posted by haunter
Minimum timeouts are 0.05 :)
Not serverside :\

osrs 02-15-2004 05:50 AM

Maybe you aren't using move right?

ZeLpH_MyStiK 02-15-2004 06:27 AM

Quote:

Originally posted by osrs
Maybe you aren't using move right?
Nope that's not the problem. I found out what was the problem tho. It was b/c my computer was lagging, and also cachetype 2 seemed to smooth almost everything out =)

Termina_Owner 02-15-2004 06:39 AM

Use move Command between 0.1 timeout intervals.

EDIT: Gah... You make me look stupid :P

ZeLpH_MyStiK 02-15-2004 07:28 AM

Quote:

Originally posted by Termina_Owner
Use move Command between 0.1 timeout intervals.

EDIT: Gah... You make me look stupid :P

That wasnt the problem cause that's what I did from all the way in the beginning.

Now I have another question: Is it possible to do a clientside triggeraction with the npc itself? In other words, the npc clientside triggeractions itself...

[Edit]Trying to do a showimg which doesnt work serverside[/Edit]

Termina_Owner 02-15-2004 08:24 AM

NPC Code:

if (created){
setshape 1,32,32; // This is Vital
}
if (actionmove){
x = strtofloat(#p(0));
y = strtofloat(#p(1));
}
//#CLIENTSIDE
if (playerenters){
triggeraction x+0.5,y+0.5,move,#v(playerx),#v(playery);
}



Like that?

-- Avoid Repost:

NPC Code:

if (created){
setshape 1,32,32; // This is Vital
}
if (playerchats){
triggeraction x+0.5,y+0.5,clientside,move,5,5;
}
//#CLIENTSIDE
if (actionclientside){
x = strtofloat(#p(0));
y = strtofloat(#p(1));
}



Or that?

R0bin 02-15-2004 03:41 PM

Quote:

Originally posted by Termina_Owner
NPC Code:

setshape 1,32,32; // This is Vital



Um.. no?

ZeLpH_MyStiK 02-15-2004 04:37 PM

Quote:

Originally posted by Termina_Owner
NPC Code:

if (created){
setshape 1,32,32; // This is Vital
}
if (actionmove){
x = strtofloat(#p(0));
y = strtofloat(#p(1));
}
//#CLIENTSIDE
if (playerenters){
triggeraction x+0.5,y+0.5,move,#v(playerx),#v(playery);
}



Like that?

-- Avoid Repost:

NPC Code:

if (created){
setshape 1,32,32; // This is Vital
}
if (playerchats){
triggeraction x+0.5,y+0.5,clientside,move,5,5;
}
//#CLIENTSIDE
if (actionclientside){
x = strtofloat(#p(0));
y = strtofloat(#p(1));
}



Or that?

Why do you have 'move' after clientside? It's not a weapon npc, and you didn't use it as a param...

Termina_Owner 02-15-2004 07:25 PM

Quote:

Originally posted by R0bin


Um.. no?

Yes.

Quote:

Why do you have 'move' after clientside? It's not a weapon npc, and you didn't use it as a param...
Just cut move out... :/ I was doing it fast.

ZeLpH_MyStiK 02-15-2004 07:45 PM

Nope doesnt work, maybe clientside triggeraction only works for weapon npcs...

-Ramirez- 02-15-2004 07:58 PM

Quote:

Originally posted by ZeLpH_MyStiK
Nope doesnt work, maybe clientside triggeraction only works for weapon npcs...
Correct.

Unless the trigger is sent from a different NPC. Then I believe it goes clientside AND serverside. I might be remembering wrong though.

ZeLpH_MyStiK 02-15-2004 08:56 PM

Quote:

Originally posted by -Ramirez-

Correct.

Unless the trigger is sent from a different NPC. Then I believe it goes clientside AND serverside. I might be remembering wrong though.

Nope only serverside, unless lets say you have a weapon npc which receives a serverside triggeraction and from that triggers clientside triggeraction to itself.


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

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