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

Really stupid scripting problem

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Wed Mar 28, 2007 10:07 pm    Post subject: Really stupid scripting problem Reply with quote

I actually feel kinda embarrassed asking about this, but I just can't seem to figure it out.

In part of my code, I have two npcs walking at the same time (one basically being in front of the other). I've basically tried coding it every way I can think of, and it always results in the same thing: one npc moving correctly and the other just "sitting" there. I'm basically using two walk npc commands one right after the other with no "waits". I'm pretty sure i've done this before, but it's not working for me now.

Maybe i'm wrong and there is a completely different way to accomplish this. Any help would be appreciated!
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
Leonhart




Joined: 25 Feb 2004
Posts: 383
Location: Philippines

PostPosted: Thu Mar 29, 2007 12:22 am    Post subject: Reply with quote

Have you already set the speed of the nonmoving NPC?
Post your plotscript here.
_________________
The man who smiles when things go wrong has thought of someone to blame it on.
- Robert Bloch
Back to top
View user's profile Send private message
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Thu Mar 29, 2007 5:56 am    Post subject: Reply with quote

Code:
fade screen in
wait for all
focus camera (8,9,2)
wait for camera
wait (250)
wait for all
walk npc (2,east,8)
wait for npc (2)
walk npc (2,south,6)
wait for npc (2)
set npc direction (2,right)
wait for npc (2)
wait (15)
set npc direction (2,left)
wait for npc (2)
wait (15)
set npc direction (2,right)
wait for npc (2)
wait (15)
set npc direction (2,left)
wait for npc (2)
wait (15)
set npc direction (2,south)
wait for npc (2)
wait (15)
walk npc (2,south,3)
wait for npc (2)
wait (15)
alter npc (2,NPCStat:picture,20)
wait (30)
[b]walk npc (2,north,9)
walk npc (1,north,9)[/b]
wait for all
fade screen out


The bolded section is where the problem starts. Basically, what this part of the script does is move the camera up to a specific location. When that is done, it moves npc #2 down around npc #1. After that, BOTH npcs are supposed to walk up at the same time, however, npc #2 just sits there and npc #1 walks up alone. I've tried it several different ways, but none have worked thus far. Yes, both npcs have a set speed of 2.

Hope this helps, cause I still can't figure it out Oookay...

EDIT: The code that has the bolded TAGS is where the problem is....guess you can't bold code Raspberry!
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Thu Mar 29, 2007 7:08 am    Post subject: Reply with quote

How are they positioned relatively to each other? If they are horizontal with each other, this should work fine as long as there are no accidental passibility mistakes on the wallmap in custom. If they are vertical with each other, I'm pretty sure you MUST have the northmost NPC move first, have a wait(1) command, and then have the second NPC start walking. Otherwise they will try to walk at the exact same time and the southmost NPC will hit the northmost NPC and stop.

Alternatively, if no other NPCs are doing anything at the moment, you could use a suspend obstruction command and just leave the commands as they are currently, I believe.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Meatballsub
Divine Bovine




Joined: 16 Jun 2003
Posts: 437
Location: Northwest Georgia

PostPosted: Thu Mar 29, 2007 2:19 pm    Post subject: Reply with quote

The one tick wait worked!! I guess for some reason I assumed that them hitting each other wasn't the problem since one npc was moving in and out of the other npc just fine. It's fixed now though, thanks Razz
_________________
MOCBJ Software - My Games
The Hamster Wheel - OHRRPGCE Information Database
Back to top
View user's profile Send private message Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Apr 01, 2007 7:58 pm    Post subject: Reply with quote

Meatballsub wrote:
The one tick wait worked!! I guess for some reason I assumed that them hitting each other wasn't the problem since one npc was moving in and out of the other npc just fine. It's fixed now though, thanks Razz


Huh? The bottom npc walks through the top npc? Is obstruction suspended? Either way, smells like a bug.
_________________
"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