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 07-26-2001, 08:35 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
FollowPlayer

How do you stop the command Followplayer? No one seems to know LOL
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #2  
Old 07-26-2001, 08:49 AM
Lionel-Jonson Lionel-Jonson is offline
Fly away on my zephyr
Join Date: Jul 2001
Location: Never
Posts: 2,798
Lionel-Jonson is on a distinguished road
Send a message via ICQ to Lionel-Jonson Send a message via AIM to Lionel-Jonson Send a message via Yahoo to Lionel-Jonson
LOL!
Reply With Quote
  #3  
Old 07-26-2001, 09:07 AM
Silver Knight Silver Knight is offline
The Ice Cream Social
Silver Knight's Avatar
Join Date: Jun 2001
Location: SoCal
Posts: 541
Silver Knight is on a distinguished road
Send a message via AIM to Silver Knight
READ COMMANDS.RTF FOR ONCE!

It says something like: followplayer makes the npc follow player untill an x,y is specified.
__________________
Reply With Quote
  #4  
Old 07-26-2001, 10:06 AM
richard richard is offline
Registered User
Join Date: Jun 2001
Location: Canada, B.C
Posts: 269
richard is on a distinguished road
Send a message via ICQ to richard Send a message via AIM to richard
(Shaun)

<Shaun>

until the npc is thrown

</Shaun>
__________________
no sig you have a prob wit that?
Reply With Quote
  #5  
Old 07-26-2001, 10:33 AM
CyanideSR71 CyanideSR71 is offline
Registered User
CyanideSR71's Avatar
Join Date: Jun 2001
Location: Canada
Posts: 460
CyanideSR71 is on a distinguished road
set it's x and y coordinates
__________________
Cyanide SR71
Former Shadow Dragon
Co-Owner of what was Murasamune
Reply With Quote
  #6  
Old 07-26-2001, 08:32 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Alright, well how would I detect what x any y it is at now and then make it so it stays there and changes back to the idle.gif?? Here is what i tried:

if(created){
setimg zen1kuros1.gif; //the idle gif
}
if(playerchats&&strequals(#c,come)){
followplayer;
set following;
}
while (following) {
if(playerdir==0){
setimg zen1kuros6.gif;
}
if(playerdir==1){
setimg zen1kuros7.gif;
}
if(playerdir==2){
setimg zen1kuros5.gif;
}
if(playerdir==3){
setimg zen1kuros8.gif;
}
if (playersays(stop)) {
this.x=x;
this.y=y;
setimg zen1kuros1.gif,x,y;
}
sleep 0.05;
}

How can I change this so that It knows its X and Y and stays there which would cause it to change back to the idle image and to stop following player??
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 07-26-2001, 08:56 PM
CyanideSR71 CyanideSR71 is offline
Registered User
CyanideSR71's Avatar
Join Date: Jun 2001
Location: Canada
Posts: 460
CyanideSR71 is on a distinguished road
Okay, first I believe that followplayer only works offline...

x=x;
y=y;
May work...
That or x+=0.05 or something like that.
__________________
Cyanide SR71
Former Shadow Dragon
Co-Owner of what was Murasamune
Reply With Quote
  #8  
Old 07-26-2001, 11:03 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
what!?!?! Followplayer only works offline?

Would it be hard to script it so that a NPC follows and does all the stuff in the script about accept it looks like followplayer accept scripted??
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #9  
Old 07-26-2001, 11:04 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
BTW, Thanks Cyanide
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #10  
Old 07-26-2001, 11:52 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
*cough* bomy pets follow player and are online *cough*

But thats coded out, it isn't just "followplayer" I have made scripted following npcs before.. I could give it a try and make an example if you want me to.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #11  
Old 07-27-2001, 12:14 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
Konidias he means the actual command follow player cannot be used online.Bomy pet's use wa more complicated then followplayer -_-
Reply With Quote
  #12  
Old 07-27-2001, 12:32 AM
IceHawk IceHawk is offline
Jenseits von Gut und Böse
IceHawk's Avatar
Join Date: Mar 2001
Location: Vancouver BC, Canada
Posts: 4,704
IceHawk will become famous soon enough
Send a message via AIM to IceHawk
Merlin:
what if you do like
while (flag) {followplayer;}

while (!flag) { }
__________________
Reply With Quote
  #13  
Old 07-27-2001, 12:54 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Followplayer won't work online, and I believe it might be taken out soon. It's nothing more than a seeking script though. If you can make 'heat-seeking' missiles (or arrows) in graal then you can make a followplayer script.

There's a few ways you can do it: one just moves x/y using a a set speed toward the correct position depending on if the x/y is greater or smaller than the current x/y. Another way is to use trig and find the exact angle to move at...though harder, it's usually more accurate and can have a nice effect. The third way is to just make an array of positions the object being followed has been in, and put the following object in those positions.

Bomies use the third method. It's pretty easy to pick out which method is being used. If you use arrays the path will go where you've been. If you use trig it will go straight toward where you are (see: boomerang). The first method will look kinda blocky...and either x or y will level out first and the NPC will walk in a straight line. You can usually tell how much effort is put into a following script by observing how it follows

There's a fourth method of course...a more advanced version of the trig one...that uses pathfinding to go around objects instead of going through them...but that's a hard one to get down...I've only seen a couple people come close to doing it effectively...
Reply With Quote
  #14  
Old 07-27-2001, 01:16 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Quote:
Originally posted by Komieko
Konidias he means the actual command follow player cannot be used online.Bomy pet's use wa more complicated then followplayer -_-
Uhh Komieko.. thats what I said -_-;
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #15  
Old 07-27-2001, 06:08 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
I believe there is a npc tutorial on the G2k1 site about making baddies. They have a few player following scripts.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #16  
Old 07-27-2001, 06:43 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Quote:
Originally posted by kyle0654
Followplayer won't work online, and I believe it might be taken out soon. It's nothing more than a seeking script though. If you can make 'heat-seeking' missiles (or arrows) in graal then you can make a followplayer script.

There's a few ways you can do it: one just moves x/y using a a set speed toward the correct position depending on if the x/y is greater or smaller than the current x/y. Another way is to use trig and find the exact angle to move at...though harder, it's usually more accurate and can have a nice effect. The third way is to just make an array of positions the object being followed has been in, and put the following object in those positions.

Bomies use the third method. It's pretty easy to pick out which method is being used. If you use arrays the path will go where you've been. If you use trig it will go straight toward where you are (see: boomerang). The first method will look kinda blocky...and either x or y will level out first and the NPC will walk in a straight line. You can usually tell how much effort is put into a following script by observing how it follows

There's a fourth method of course...a more advanced version of the trig one...that uses pathfinding to go around objects instead of going through them...but that's a hard one to get down...I've only seen a couple people come close to doing it effectively...
Holy ****! I wish I was smart enough to know all that =\ Oh well. If you could give it a try konindias I would appreciate it. A lot of people have tried and cant. =\ If you can I would like to know how. I hate asking for scripts but i dont consider this a script seeing as how I posted the script I made and I just need it fixed. Thanks again Kyle and Konindias for the help.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #17  
Old 07-27-2001, 09:53 AM
CyanideSR71 CyanideSR71 is offline
Registered User
CyanideSR71's Avatar
Join Date: Jun 2001
Location: Canada
Posts: 460
CyanideSR71 is on a distinguished road
Holy crap!
I understand what Kyle is talking about... That's scary.
__________________
Cyanide SR71
Former Shadow Dragon
Co-Owner of what was Murasamune
Reply With Quote
  #18  
Old 07-27-2001, 09:57 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Not really cuz ur a good scripter too
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #19  
Old 07-27-2001, 10:22 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
there's also the move-method...I think you could do it using the move command...I dunno, that might be worse than doing some of the others though...
Reply With Quote
  #20  
Old 07-27-2001, 05:56 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by kyle0654
there's also the move-method...I think you could do it using the move command...I dunno, that might be worse than doing some of the others though...
I think the move command would be better on the NPC Server when it comes to making the following movement look more normal, at least with the movement command you can make it look like the NPC walks two times 0.5 instead of 1 at the same time while walking the same distance (Due to the timeouts of 0.1 seconds the NPC Server uses)

Oh and probably move playerx,playery,time,type; would work, it's just that the NPC would ignore walls
__________________

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 02:51 PM.


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