Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

problem with NPC Y(*)

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Sat Aug 14, 2004 1:10 pm    Post subject: problem with NPC Y(*) Reply with quote

I have come to believe that NPC Y(*) will return the ID number of the NPC if there are no copies of this npc on the map. I can get around this with an if check with NPC reference, but I would think that this ought to return something like (-1) rather than the ID number. Has anyone else experienced this, or is there a chance I just have something wrong with my script?
Back to top
View user's profile Send private message Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sat Aug 14, 2004 2:16 pm    Post subject: Reply with quote

Why would you ever reference the location of an NPC that doesn't exist? Sounds like a bad idea to begin with.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Sat Aug 14, 2004 2:26 pm    Post subject: Reply with quote

I use this in order to create multiple parties. I have a map for the 'party selection screen' that has an NPC for each hero you can pick. Activating the NPC moves it into or out of the 'IN' row, and then once you have the heroes you want in the given party standing in the 'IN' row, you activate another NPC. The script of this NPC captures which heroes you've picked by checking what row every 'hero NPC' is in, and if it is in the IN row it is added to the party. This uses the NPC Y(*) command, but sometimes there are certain heroes who cannot be picked, so they are not in the lineup. Thus their hero NPC does not exist, so NPC Y(*) returns the NPC's ID number. I suppose there are probably easier ways to plotscript this kind of party selection, but this was the best I could think of to make sure of certain things (easy error checking for things like no heroes in a party, or too many; having certain heroes necessarily placed in a certain party; etc.).
Back to top
View user's profile Send private message Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sat Aug 14, 2004 4:02 pm    Post subject: Reply with quote

Then check if the hero is available before trying to figure out where he is onscreen.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Aug 14, 2004 5:13 pm    Post subject: Reply with quote

You mean, if you pass NPC Y the id number of an npc which isn't on the map, it returns the npc id number?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Mon Aug 16, 2004 11:06 am    Post subject: Reply with quote

Yes Mad Cacti, that is what I mean. And moogle1, that is the current way I am getting around it, but it seems to me that that ought not to be necessasry.
Back to top
View user's profile Send private message Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Aug 16, 2004 1:06 pm    Post subject: Reply with quote

It's really better programming practice. And, yes, I ironically agree that it shouldn't make you program well, just like IF games don't make you speak well ("main screen turn on" might even work in an IF game), but you should sttill do it.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group