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

NPC depth

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Sat Oct 31, 2009 2:40 pm    Post subject: NPC depth Reply with quote

Quick question, is there any way to set specific NPCs to appear over other NPCs?

How is this - "NPC depth" - determined, anyway? I've tried messing around with the order of NPC creation in the script as well as their numeric order, and I can't come to any conclusions.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Nov 01, 2009 1:23 am    Post subject: Reply with quote

NPCs are layered by reference number. The NPC reference number is in the range -300 to -1. NPCs placed in Custom are given references starting from -1 and going down, they get the highest unused reference. CreateNPC assigns reference numbers starting from -300 up, into the lowest available slot.

NPC -1 is drawn first, -300 last, so NPCs created by scripts will appear above all NPCs placed in Custom, unless you place close to 300 NPCs on the map so that the ranges overlap.

Years ago, since we didn't have slices, I wrote this script to change the layering of already-existing npcs:
'What is the 3rd Party HSI?#swap npc ref (npc ref1, npc ref2)'

These days you can could use slices instead. Eventually (prehaps very soon), NPCs will just become slices, so you'll be able to change the layering directly.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Sun Nov 01, 2009 2:25 am    Post subject: Reply with quote

I keep forgetting about these newfangled slices! I'll probably use that to solve my problem.

Come to think of it, I should probably stop using strings of NPCs just to illustrate large objects.
Back to top
View user's profile Send private message
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sun Nov 01, 2009 4:07 am    Post subject: Reply with quote

Eh?

What's a slice?
Is that just another word for one of the 3 maptile layers?
_________________
Working on rain and cloud formation
Back to top
View user's profile Send private message
Newbie_Power




Joined: 04 Sep 2006
Posts: 1762

PostPosted: Sun Nov 01, 2009 5:58 am    Post subject: Reply with quote

Map layers are slices, but that's not all slices are. They're really something from a MacGyver episode with different purposes, such as moving sprites, hud displays, or even non-graphic slices for storing data or tracking x/y for other slices.

Slices are a magic spell conjured up by the highest order of Technomancy and preserved in scrolls whose fibers are constructed like the finest toilet paper, and contain arcane wisdom written in Freebasic and a sharpie.
_________________

TheGiz> Am I the only one who likes to imagine that Elijah Wood's character in Back to the Future 2, the kid at the Wild Gunman machine in the Cafe 80's, is some future descendant of the AVGN?
Back to top
View user's profile Send private message
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