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 01-25-2002, 07:28 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
callnpc 'index' ?

Uhh, I have been using callnpc quite
a bit lately ... And I wanted to know
if there is a way to find the NPC index
without using something like:
NPC Code:

NPC Code:

for (i=0;i<npcscount;i++) {
callnpc i,event;
}




I understand how everything works, I
just would like to know if there is a
way to get the index of an NPC ...
Reply With Quote
  #2  
Old 01-25-2002, 07:55 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Uhm.
testnpc(x,y)?
I guess there isn't...
Reply With Quote
  #3  
Old 01-26-2002, 03:24 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
depends what you are looking for .. if you are looking for a certain npc in a lvl u can browse thru the npc array and stuff .. but like u cant set ne properties in a npc in which you will be able to view thru there..
__________________
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
  #4  
Old 01-26-2002, 03:26 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by LiquidIce00
depends what you are looking for .. if you are looking for a certain npc in a lvl u can browse thru the npc array and stuff .. but like u cant set ne properties in a npc in which you will be able to view thru there..
well, I mean I was just wondering if there
was a way to test for the index sorta like
on images ...
Reply With Quote
  #5  
Old 01-26-2002, 08:55 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Quote:
Originally posted by nyghtGT

well, I mean I was just wondering if there
was a way to test for the index sorta like
on images ...
Look in the debugger (there's numbers beside the name of the image and other npcs...It's not always right, but it should be within 2 numbers)

Gohan
Reply With Quote
  #6  
Old 01-26-2002, 09:09 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 nyghtGT

well, I mean I was just wondering if there
was a way to test for the index sorta like
on images ...
u can check the npc's image now i believe
__________________
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
  #7  
Old 01-26-2002, 10:36 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
You mean only call the event on a certain NPC? Try setting a special number to one of the npc's save variables, then looping through all the NPC's in the level looking for the NPC with the certain save variable:
NPC Code:

for (i=0;i<npcscount;i++) {
if (npcs[i].save[3]==11) callnpc i,event;
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #8  
Old 01-27-2002, 09:53 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

Well if you have the npc with a certain image...

#f(i)

__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
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 07:30 AM.


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