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 06-25-2001, 09:27 AM
Metal-Slug Metal-Slug is offline
!_!
Metal-Slug's Avatar
Join Date: Jun 2001
Posts: 2,421
Metal-Slug is on a distinguished road
Online followplayer

how i make a non-showcharacter like npc follow the player ONLINE
__________________

Er1c2 loaded the local ban info of Loriel-2002 RC
Reply With Quote
  #2  
Old 06-25-2001, 09:46 AM
LilNiglet LilNiglet is offline
Registered User
Join Date: Jun 2001
Posts: 3,178
LilNiglet is on a distinguished road
i think you need a npc-server for that, yah u do
and i PMd u my hed #'s here it is again just in case 857 and 534
couldnt u just use
NPC Code:

timeout = .05;
if (timeout){
x = playerx - 1;
y = playery;
timeout = .05;
}


but taht may lag a LOT
Reply With Quote
  #3  
Old 06-25-2001, 09:55 AM
vergil vergil is offline
Registered User
vergil's Avatar
Join Date: Mar 2001
Posts: 1,408
vergil will become famous soon enough
Send a message via ICQ to vergil
Once again this is an opportunity where arguments would be useful, if they were..

NPC Code:

function checkd(x,y) {
if (count<51) {
if (onwall(x,y)) {
count++;
if (playerdir == 0) { checkd(x,y+.1); }
if (playerdir == 1) { checkd(x-.1,y); }
if (playerdir == 2) { checkd(x,y-.1); }
if (playerdir == 3) { checkd(x+.1,y); }
}
else {
showimg 1,myimage,x,y;
}
}
}

if (created) {
myimage = "followingthing.gif";
}
if (playertouchesme) {
// Start following
timeout = .1;
this.follow = 1;
}
if (timeout) {
if (this.follow = 1) {
if (playerdir == 0) { checkd(x+1.5,y+4)) }
if (playerdir == 1) { checkd(x+4,y-1.5)) }
if (playerdir == 2) { checkd(x+1.5,y-4)) }
if (playerdir == 3) { checkd(x-4,y-1.5)) }
}
timeout=.1;
}



Presumably this will check to see if theres a wall in its way 50 times before stopping (which probably doesn't work because I'm a bad coder) and it'll make the image follow you within 4 spaces, but it's useless because i cant define arguements with functions.

It probably wouldnt work anyway (as you can see i have 0 self esteem) if I could
Reply With Quote
  #4  
Old 06-25-2001, 09:58 AM
Metal-Slug Metal-Slug is offline
!_!
Metal-Slug's Avatar
Join Date: Jun 2001
Posts: 2,421
Metal-Slug is on a distinguished road
lol, still more suggestions!!
__________________

Er1c2 loaded the local ban info of Loriel-2002 RC
Reply With Quote
  #5  
Old 06-25-2001, 10:03 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
Do it with #F I think =/
Reply With Quote
  #6  
Old 06-25-2001, 10:59 AM
Metal-Slug Metal-Slug is offline
!_!
Metal-Slug's Avatar
Join Date: Jun 2001
Posts: 2,421
Metal-Slug is on a distinguished road
??????? how
if (created) {
#F;
}
__________________

Er1c2 loaded the local ban info of Loriel-2002 RC
Reply With Quote
  #7  
Old 06-25-2001, 12:19 PM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
if (playerleaves){
warpto #F,playerx,playery;
}
Reply With Quote
  #8  
Old 06-25-2001, 12:30 PM
Metal-Slug Metal-Slug is offline
!_!
Metal-Slug's Avatar
Join Date: Jun 2001
Posts: 2,421
Metal-Slug is on a distinguished road
i dont want it to follow to every level, i want it to be jsut like followplayer
__________________

Er1c2 loaded the local ban info of Loriel-2002 RC
Reply With Quote
  #9  
Old 06-25-2001, 01:00 PM
General General is offline
Banned
Join Date: Apr 2001
Location: Station Square
Posts: 984
General is on a distinguished road
Send a message via ICQ to General Send a message via AIM to General Send a message via Yahoo to General
make a voodoo shroomy
Reply With Quote
  #10  
Old 06-26-2001, 04:05 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
make a system NPC that creates an array of the last 8 playerx and playerys. Either write to it with a moving pointer or continually move every value down a notch. Showimg the npc at the last values of the array
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #11  
Old 06-26-2001, 08:11 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
Quote:
Originally posted by Tyhm
make a system NPC that creates an array of the last 8 playerx and playerys. Either write to it with a moving pointer or continually move every value down a notch. Showimg the npc at the last values of the array
basically what a bomy pet does.
__________________
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
  #12  
Old 07-27-2001, 07:55 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
So did anyone ever figure out how to do this right??
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #13  
Old 07-27-2001, 10:32 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
Did anyone figure out how to get you to stop spamming...

Oh, btw, Nothar owns cheeze its!
__________________
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 10:39 PM.


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