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

This is really begining to make me mad...

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
lethal255
Don't just complain, do something about it




Joined: 11 Nov 2003
Posts: 76
Location: Right behind you

PostPosted: Thu Oct 21, 2004 5:49 pm    Post subject: This is really begining to make me mad... Reply with quote

alright, for the past week i've been trying to work out this bug involving npc references with no luck

Ok, here's my problem. In the process of making a custom menu, I've needed to make a section where you pick a job. The NPc's are generated through seperate scripts like so:

Code:
      
if(check tag(tag:Have Kngiht)) then (
      alter NPC (NPC reference(0,NPC copy count(0)),NPCstat:picture,10)
      alter NPC (NPC reference(0,NPC copy count(0)),NPCstat:palette,2)
      )


which works fine, on till I try loading a seconded one. When I do this, both npc's pictures and palettes are changed to the same. So the basic dillemma is:Ohr reconognizes all npc's as the same, regardless of copy count. How do I fix this???

:flamedevil: :flamedevil: :flamedevil: :flamedevil: :flamedevil:
_________________
"what everyone went around calling you white stormy?"

"you mean, there's...a ...black stormy?"

"No"
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Thu Oct 21, 2004 6:08 pm    Post subject: Reply with quote

You can't alter NPC references, only IDs.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Thu Oct 21, 2004 6:23 pm    Post subject: Re: This is really begining to make me mad... Reply with quote

lethal255 wrote:
Code:
      
if(check tag(tag:Have Kngiht)) then (
   alter NPC (NPC reference(0,NPC copy count(0)),NPCstat:picture,10)
   alter NPC (NPC reference(0,NPC copy count(0)),NPCstat:palette,2)
)


alright, I see two problems with this script.
(1) This isn't as serious as the one below, I'll explain below.
"NPC copy count(0)" returns the number of NPCs that is using the NPC ID 0. which will mean that "NPC reference" will always refer to the same NPC.
(2) This is the seriously one.
"alter NPC" changes the properties of the ID of that NPC, meaning that every NPC that uses that ID number will be changed regardless of whether it was referenced or not.

Solution.
Ok, since I don't know exactly how your script is setup and how you are using the NPCs, I'll just you two scenarios that I've used/use.

(1) use "Change NPC ID(NPC reference(NPC:knight,selection),Selected)"
this will change the NPC's ID, so it will use a different NPC ID property set, thus changing it's look. This is a lot more confusing to use, since you will need to focus on storing NPC references in variables or global variables.
(2) use "alter NPC", but every NPC will need to have a different NPC ID property set, it's basically what you have done, but all the NPCs will need to be unique.

method (2) is a lot easier to understand and manipulate
method (1) is more advanced, take a while to understand and works a look faster than method (2) when you're using many NPCs.
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Soule X




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Fri Oct 22, 2004 1:50 am    Post subject: Reply with quote

The NPC copy count command confuses me. I haven't used it in a while, but when I did it seemed like it was returning a high number like 10 or something when there were only 2 NPCs.
Back to top
View user's profile Send private message Send e-mail AIM Address
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Fri Oct 22, 2004 7:39 am    Post subject: Reply with quote

Seemed? If you want to be certain, you could always use "show value", you know.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
lethal255
Don't just complain, do something about it




Joined: 11 Nov 2003
Posts: 76
Location: Right behind you

PostPosted: Fri Oct 22, 2004 1:03 pm    Post subject: Reply with quote

damn, It changes every npc? this is gonna suck.
_________________
"what everyone went around calling you white stormy?"

"you mean, there's...a ...black stormy?"

"No"
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
RPGCreations
E Pluribus Unum




Joined: 18 May 2003
Posts: 345

PostPosted: Fri Oct 22, 2004 1:20 pm    Post subject: Reply with quote

All copies of an NPC willbe the same. You will need to use seperate NPCs or possibly tiles if you just need portraits.
_________________
Back to top
View user's profile Send private message
lethal255
Don't just complain, do something about it




Joined: 11 Nov 2003
Posts: 76
Location: Right behind you

PostPosted: Fri Oct 22, 2004 6:35 pm    Post subject: Reply with quote

Yeah, I just relized how only change one copy of the same npc id would be impossible, seeing as how the ohr can only hold 35 diffrent npc's at a time.
_________________
"what everyone went around calling you white stormy?"

"you mean, there's...a ...black stormy?"

"No"
Back to top
View user's profile Send private message Send e-mail 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