View previous topic :: View next topic |
Author |
Message |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Sat Aug 14, 2004 1:10 pm Post subject: problem with NPC Y(*) |
|
|
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 |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Aug 14, 2004 2:16 pm Post subject: |
|
|
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 |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Sat Aug 14, 2004 2:26 pm Post subject: |
|
|
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 |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Aug 14, 2004 4:02 pm Post subject: |
|
|
Then check if the hero is available before trying to figure out where he is onscreen. _________________
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Aug 14, 2004 5:13 pm Post subject: |
|
|
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 |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Mon Aug 16, 2004 11:06 am Post subject: |
|
|
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 |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Aug 16, 2004 1:06 pm Post subject: |
|
|
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 |
|
 |
|