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

NPCs Walking Over Heroes?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
Camdog




Joined: 08 Aug 2003
Posts: 606

PostPosted: Fri Oct 31, 2008 8:58 am    Post subject: NPCs Walking Over Heroes? Reply with quote

I'm making a sidescroller with the OHR, and I'd like to use pre-existing movement patterns for the NPCs that are enemies. I've noticed everything works fine if the player runs into the NPC (ie you die), but if the player stands around waiting for the enemy to walk into him, the NPC will turn around before a collision occurs. This is despite the suspend commands I've issued the game via plotscripting.

So, the question is, is there any way, short of plotscripting movement routines or changing the source code, that would cause an NPC to walk into a hero of it's own volition?
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



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

PostPosted: Fri Oct 31, 2008 9:01 am    Post subject: Reply with quote

The question is, what is a mahna mahna?

You have suspend obstruction, suspend hero walls, and suspend npc walls? (I think you only need the first one, but why not throw them all in?)
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Fri Oct 31, 2008 9:27 am    Post subject: Reply with quote

What you are seeing is probably related to '' . bug_title('22') . ''.

NPC activation code for step-on and touch NPCs is only checked when the hero moves, not when the NPCs move.

First it would be awesome if you could make a simple test case for this bug with both step-on ant touch NPCs and attach it to bug 22 or e-mail it to me. I already have a good understanding of why this bug is happening, but having the test case would save me the time of having to create one myself :)

If you want that effect without waiting for the bug to get fixed, you probably need a continuously running loop that does something like this:

Code:

 variable(x,y)
 x:=hero x(0)
 y:=hero y(0)
 if(npc at spot(x, y)) then (do collision action)
 if(npc at spot(x--1, y)) then (do collision action)
 if(npc at spot(x+1, y)) then (do collision action)
 if(npc at spot(x, y--1)) then (do collision action)
 if(npc at spot(x, y+)) then (do collision action)


Which is a bit of a hack, but it should work well enough.
Back to top
View user's profile Send private message Send e-mail 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: Fri Oct 31, 2008 9:40 am    Post subject: Reply with quote

You're confusing the problem -- but that is a simpler solution: make them step on NPCs. They'll run through the hero that way.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Fri Oct 31, 2008 12:37 pm    Post subject: Reply with quote

Moogle1 wrote:
You're confusing the problem -- but that is a simpler solution: make them step on NPCs. They'll run through the hero that way.


I know Camdog was talking about touch NPCs not step-on NPCs, but I am pretty sure the cause of the problem is the same.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Camdog




Joined: 08 Aug 2003
Posts: 606

PostPosted: Fri Oct 31, 2008 1:58 pm    Post subject: Reply with quote

Whoops! Actually, it turns out that I'm just an idiot. I could've sworn those NPCs were set to step on, but they were in fact set to use. Changing that fixes my problem. Sheesh.

Fortunately, I am using a custom collision detection script, so I don't need to worry about the bug he described. Thanks guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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