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 10-17-2001, 05:44 AM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
Index???!!!

Ok Ok I need to know how to get the right index for things... If I knew how to do that then i would know how to do a bunch of other things
Reply With Quote
  #2  
Old 10-17-2001, 05: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
it is set like this.index or whatever, i think, also, Bhala, i want to start a guild, but it no let me
Reply With Quote
  #3  
Old 10-17-2001, 07:33 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by Metal-Slug
it is set like this.index or whatever, i think, also, Bhala, i want to start a guild, but it no let me
WHAT?!?!
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #4  
Old 10-20-2001, 02:34 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
I hope Kai gets his acount re-upgraded soon
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #5  
Old 10-20-2001, 03:53 AM
Jerom Jerom is offline
Banned
Jerom's Avatar
Join Date: Mar 2001
Location: In a Trash Can
Posts: 3,708
Jerom is on a distinguished road
Send a message via AIM to Jerom
Quote:
Originally posted by Xaviar
I hope Kai gets his acount re-upgraded soon
Kaimetsu lost his account
Well why the heck doesn't anyone let him use their account?
Reply With Quote
  #6  
Old 10-20-2001, 04:12 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Index???!!!

Quote:
Originally posted by Bhala
Ok Ok I need to know how to get the right index for things... If I knew how to do that then i would know how to do a bunch of other things
well there is commands for finding the index of the current thing (like the current npc that is doing the script)...

otherwise usually people do like loops to effect like all the npcs/players..

or you can do like vars with npcs like level.blah = blah

and make it equil the other npcs index...

humm I think I am sounding kinda confuzing but I hope you understand me
__________________
Thanks,
-KJL
Reply With Quote
  #7  
Old 10-20-2001, 04:20 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
there is no image[index].x type commands yet
Reply With Quote
  #8  
Old 10-20-2001, 06:02 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by btedji
there is no image[index].x type commands yet
What would be neato would be if we could
players[index].nonsystemvarname = 10;
cause that would simplify alot of things
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #9  
Old 10-20-2001, 08:37 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Xaviar


What would be neato would be if we could
players[index].nonsystemvarname = 10;
cause that would simplify alot of things
or better yet players[id].varname

that would be sooooo cool
Reply With Quote
  #10  
Old 10-20-2001, 08:43 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
Originally posted by btedji


or better yet players[id].varname

that would be sooooo cool
Um...
uh...
...
...




Ok.
__________________

-=Shard IceFire=-
Reply With Quote
  #11  
Old 10-20-2001, 08:46 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Shard_IceFire

Um...
uh...
...
...




Ok.
then it would be soooo much easier to get other player data
Reply With Quote
  #12  
Old 10-20-2001, 09:25 AM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
Doesn't testnpc, and testplayer, and the other test commands return the value of the index?
Reply With Quote
  #13  
Old 10-20-2001, 10:32 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Quote:
Originally posted by Thak2
Doesn't testnpc, and testplayer, and the other test commands return the value of the index?
that works if you know the x and y of the npc
__________________
Thanks,
-KJL
Reply With Quote
  #14  
Old 10-20-2001, 11:28 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
what is [id] for?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #15  
Old 10-20-2001, 08:32 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
what is [id] for?
If I'm not mistaken, theres no difference between id, and index..But because of the way he said it, I'm not quite sure...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #16  
Old 10-20-2001, 08:40 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
im just wondering what id and index are used for. I have a basic idea but arent there like special ones for special NPCs? like 0 is the current NPC and in some command if its over like 250 then something is different...
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #17  
Old 10-20-2001, 08:43 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
im just wondering what id and index are used for. I have a basic idea but arent there like special ones for special NPCs? like 0 is the current NPC and in some command if its over like 250 then something is different...
You use indexes to tell the difference between npcs/players/images/baddies in a level. Say there was like 20 baddies in a level for one of those lame quests, you couldn't just do baddy.x could you? How would you know which baddy you'd be affecting? (Oh, and its compus, not baddy, in real gscript, by the way..) You use compus[0].x to find the x of the first baddy, compus[1].x to find the x of the second baddy, and so forth...Did I explain that well enough for you?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #18  
Old 10-20-2001, 11:43 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
yup accept how are they assigned? the first COMPUS you lay down will be 0 and the next is 1?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #19  
Old 10-20-2001, 11:51 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
yup accept how are they assigned? the first COMPUS you lay down will be 0 and the next is 1?
Umm...I'm not to sure about that, it's the first compus graal processes gets 0, the next gets 1, etc...I'm not sure the order it recognizes them in...But take players as a different example, if the script is running clientside, the player running the script is always 0 (or is that just with weapons? someone correct me..), and the players after that are assigned indexes as they enter, so the first player in would be 1 (0, if I was wrong about the non-weapon npc's), the next would be 2 (1, same reason), etc..
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #20  
Old 10-21-2001, 12:31 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
wow so you could actually make a script happen to like the 3 person to enter the room?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #21  
Old 10-21-2001, 12:44 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by ownerofbabylon
wow so you could actually make a script happen to like the 3 person to enter the room?
Yea, but you don't need indexes to do that, just:

if (playerenters) {
this.count++;
if (this.count==3) {
this.count = 0;
playerrupees += 5;
}
}

That'll give 5g to every 3rd person to walk into the level
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #22  
Old 10-21-2001, 04:16 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Xaviar


If I'm not mistaken, theres no difference between id, and index..But because of the way he said it, I'm not quite sure...
each player has a unique server id

but the index is only for the players on the current level
Reply With Quote
  #23  
Old 10-21-2001, 04:17 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Xaviar


Yea, but you don't need indexes to do that, just:

if (playerenters) {
this.count++;
if (this.count==3) {
this.count = 0;
playerrupees += 5;
}
}

That'll give 5g to every 3rd person to walk into the level
that would only work if the same player entered the level 3 times
Reply With Quote
  #24  
Old 10-21-2001, 04:56 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by btedji


that would only work if the same player entered the level 3 times
Oh yea, unless its p2p...My bad...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
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 09:00 AM.


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