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

Positioning NPCs

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Thu Aug 21, 2003 9:30 pm    Post subject: Positioning NPCs Reply with quote

I'm trying to place one NPC on top of another.

Let's say I'm using a circle and a square NPC. I want the circle NPC to appear on top of the square NPC. I moved the square NPC to the destined place first, and then moved the circle NPC to that same location and it appeared under the square, not on it.

I used the command "supsend obstruction" earlier in the script, if that means anything.

I had a script earlier in which the square NPC was already in the place I wanted it and then moved the circle over it, and it worked fine. But with the script I'm making I can't have the square NPC start off in that place, it has to move there after things happen.

If you have any idea what I could do please let me know.

Thanks,

~Worthy
Back to top
View user's profile Send private message Send e-mail AIM Address
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Thu Aug 21, 2003 10:20 pm    Post subject: Reply with quote

I hate to break this to you, man, but this is really quite simple, and it doesn't require plotscripting.

Here's what ya do!

1) Obviously, create the circle and square NPCs

2) When you place them, be sure to hold "CTRL" and pick a direction. This
is commonly used when you are trying to get a still NPC to stand in a certain direction, but as long as you use this function, it will paste on top.

The only problem is that both NPCs cannot be activated when one is on top of another.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Thu Aug 21, 2003 11:26 pm    Post subject: Reply with quote

What I mean was if I have the circle in the position (0,0) and the square in position (0,1) how can I,using plotscripting, set the square's position to (10,10) and then the circle's position to (10,10) and have the circle be on top?

Like if the player talks to an NPC I want those two NPCs to appear in the (10,10) position with the square on bottom.

~Worthy
Back to top
View user's profile Send private message Send e-mail AIM Address
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Aug 22, 2003 2:39 am    Post subject: NPC draw order Reply with quote

NPCs are drawn to the screen in NPC Reference order NPCs with low reference numbers will be underneath NPCs with high reference numbers. Unfortunately, the Reference of an NPC is not something you have very precise control over.

When you place an NPC in the map editor, it uses the first reference number available, which is 0. The second NPC you place will have reference number 1, and the third NPC you place will be 2. So generally speaking, the NPCs you place on a map later will be drawn on top of NPCs that you place earlier.

But this rule breaks down if you have placed a bunch of NPCs, and then removed a few of them. In that case, the next NPC you place will use the lowest available reference number, which might not always be higher than the reference number of all the other NPCs currently on the map. Confusing, no? Well, normally I never expected anybody to care about this sort of thing, so thats just the way it is :)

As for NPCs create with the "create NPC" plotscripting command, they work the exact opposite. They take the highest available NPC reference number, starting with 299. the next NPC you create with "create NPC" will be 298, and so on, counting backwards. This means that the first NPC you create with plotscripting will be shown on top of NPCs you create later, as well as on top of NPCs placed on the map in the map editor.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Fri Aug 22, 2003 2:50 am    Post subject: Reply with quote

Thanks! You're right, it's a bit confusing but I'll figure it out.

~Worthy
Back to top
View user's profile Send private message Send e-mail AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Aug 22, 2003 11:30 am    Post subject: Reply with quote

But... i thought that the maximum number of npcs on a map was 200... not 300... or did I get that wrong? I hope so.... Smokin'
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Flamer
The last guy on earth...




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

PostPosted: Fri Aug 22, 2003 4:08 pm    Post subject: Reply with quote

using 100 npcs is usually a lot...

i don't see why you would need 200+... unless your doing an intensive movie type scene. or just plain need it...
_________________
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
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Aug 25, 2003 4:49 am    Post subject: Reply with quote

And one more question.... how is it decided whether npcs are drawn on top of heros? Not step on npcs of course..
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Aug 26, 2003 12:07 am    Post subject: Reply with quote

I could be wrong in answering this, but I don't think that it is possible to get the NPCs on top of heroes. I've tried it before.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
*Worthy*
Critical Thinker




Joined: 11 Aug 2003
Posts: 186

PostPosted: Tue Aug 26, 2003 2:07 am    Post subject: Reply with quote

I agree, I haven't been able to get NPCs on top of heroes. That's why I just use NPCs representing the heroes.

~Worthy
Back to top
View user's profile Send private message Send e-mail AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Aug 26, 2003 6:13 am    Post subject: Reply with quote

James once said (in the howto I think) that with some some really clever plotscripting, you could fake see-through over head tiles.. maybe he was talking about using npcs as heros?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Aug 26, 2003 10:55 pm    Post subject: Reply with quote

You could always simulate it, by making NPCs with the hero's graphic. Actually, that's what Worthy just said, isn't it?? Oookay...
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Aug 27, 2003 2:14 pm    Post subject: Reply with quote

Yeah, I suppose that must be it. Oh well, cat of of the bag, I expect everyone to implement partly-overhead tiles in all demos released within 2 weeks :flamedevil:
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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