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

Walk with me

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Mon Jul 04, 2011 6:38 pm    Post subject: Walk with me Reply with quote

Ok, so heres the summary on my problems.
These scripts are not working, and they involve walking party members.

Code:
plotscript, CanusInn, begin
      suspend player
      suspend caterpillar
      walk hero X(me,10)
      wait for hero(me)
      walk hero to Y(me,4)
      wait for hero(me)
      walk hero(me,up,2)
      walk hero(1,down,2)
      walk hero(2,up,2)
      walk hero(3,down,2)
      walk hero(me,right,2)
      walk hero(1,left,2)
      walk hero(2,left,2)
      walk hero(3,right,2)
      set hero direction(2,up)
      set hero direction(3,down)
      fade screen out
      play song(22)
      wait(85)
      fade screen in
      show text box(
      wait for text box
      walk hero(me,left,2)
      walk hero(1,right,2)
      walk hero(2,right,2)
      walk hero(3,left,2)
      walk hero(me,down,2)
      walk hero(1,up,2)
      walk hero(2,down,2)
      walk hero(3,up,2)
      resume caterpillar
      resume player
      end

plotscript, Splitup, begin
      suspend player
      suspend caterpillar
      walk hero to X(me,18)
      wait for hero(me)
      walk hero to Y(me,57)
      wait for hero(me)
      walk hero(me,up,1)
      walk hero(1,down,1)
      walk hero(2,right,1)
      walk hero(3,left,1)
      set hero direction(me,down)
      set hero direction(1,up)
      set hero direction(2,left)
      set hero direction(3,right)
      show text box(239)
      wait for text box
      set hero direction(me,left)
      wait(10)
      set hero direction(me,right)
      wait(10)
      show text box(240)
      wait for text box
      set hero direction(me,left)
      set NPC position(2,18,55)
      wait(20)
      set NPC direction(2,up)
      wait(20)
      set NPC direction(2,right)
      wait(20)
      set NPC direction(2,down)
      wait(20)
      set NPC position(2,42,61)
      set NPC position(3,18,56)
      wait(20)
      set NPC position(3,43,61)
      set hero direction(me,down)
      show text box(246)
      wait for text box
      walk hero(me,down,1)
      walk hero(1,up,1)
      walk hero(2,left,1)
      walk hero(3,right,1)
      set hero direction(me,up)
      resume caterpillar
      resume player
      end


They look good, don't they? Well, they're not working. One difficulty is that two heroes in this point of the game are optional. One thing I want is to be able to show a text box if they have that certain hero. Now, heres some specific problems:

*Canus Inn refuses to compile. Something about a missing ) or end...
*Split Up won't work the way I want. The heroes don't split up. I only tried it with two heroes, though, the minimum at the point of the game.

If theres anything else you would like to add, or know about where these scripts are going to use, feel free to ask.[/code]
Back to top
View user's profile Send private message
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Tue Jul 05, 2011 3:51 am    Post subject: Re: Walk with me Reply with quote

Right let's try this, it all looks pretty alright, but you need more wait for hero commands in the first script there, and you forgot to add a textbox ID and a ) to one of the lines.

Code:
plotscript, CanusInn, begin
      suspend player
      suspend caterpillar
      walk hero X(me,10)
      wait for hero(me)
      walk hero to Y(me,4)
      wait for hero(me)
      walk hero(me,up,2)
      walk hero(1,down,2)
      walk hero(2,up,2)
      walk hero(3,down,2)
                wait for hero(3)
      walk hero(me,right,2)
      walk hero(1,left,2)
      walk hero(2,left,2)
      walk hero(3,right,2)
                wait for hero(3)
      set hero direction(2,up)
      set hero direction(3,down)
                wait for hero(3)
      fade screen out
      play song(22)
      wait(85)
      fade screen in
                wait(1) # in my experience this always creates a smoother fade in, so this is purely cosmetic
      show text box(ID) # this is where the missing ")" or "end" was
      wait for text box
      walk hero(me,left,2)
      walk hero(1,right,2)
      walk hero(2,right,2)
      walk hero(3,left,2)
                wait for hero(3)
      walk hero(me,down,2)
      walk hero(1,up,2)
      walk hero(2,down,2)
      walk hero(3,up,2)
      wait for hero(3)
                resume caterpillar
      resume player
      end

plotscript, Splitup, begin
      suspend player
      suspend caterpillar
      walk hero to X(me,18)
      wait for hero(me)
      walk hero to Y(me,57)
      wait for hero(me)
      walk hero(me,up,1)
      walk hero(1,down,1)
      walk hero(2,right,1)
      walk hero(3,left,1)
                wait for hero(3)
      set hero direction(me,down)
      set hero direction(1,up)
      set hero direction(2,left)
      set hero direction(3,right)
      wait for hero(3)
                show text box(239)
      wait for text box
      set hero direction(me,left)
      wait for hero(me) # these wait for hero(me) I've added might not be needed
                wait(10)
      set hero direction(me,right)
      wait for hero(me) # same as above
                wait(10)
      show text box(240)
      wait for text box
      set hero direction(me,left)
                wait for hero(me)
      set NPC position(2,18,55)
      wait for NPC(2)
                wait(20)
      set NPC direction(2,up)
      wait for NPC(2)
                wait(20)
      set NPC direction(2,right)
      wait for NPC(2)
                wait(20)
      set NPC direction(2,down)
      wait for NPC(2)
                wait(20)
      set NPC position(2,42,61)
      set NPC position(3,18,56)
                wait for NPC(2)
                wait for NPC(3)
      wait(20)
      set NPC position(3,43,61)
                wait for NPC(3)
      set hero direction(me,down)
                wait for hero(me)
      show text box(246)
      wait for text box
      walk hero(me,down,1)
      walk hero(1,up,1)
      walk hero(2,left,1)
      walk hero(3,right,1)
                wait for hero(3)
      set hero direction(me,up)
                wait for hero(me)
      resume caterpillar
      resume player
      end


Try it now, I've added a lot of missing wait for... commands. If this doesn't work the way you intended it to work give me a more detailed analysis of how these scenes should work.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Mon Jul 11, 2011 7:15 pm    Post subject: Reply with quote

Nope, they're not working. Heres the scripts again.

Code:
plotscript, CanusInn, begin
               suspend player
         suspend caterpillar
         walk hero to X(me,10)
         wait for hero(me)
         walk hero to Y(me,4)
         wait for hero(me)
         walk hero(me,up,2)
         walk hero(1,down,2)
         walk hero(2,up,2)
         walk hero(3,down,2)
         wait for hero(3)
         walk hero(me,right,2)
         walk hero(1,left,2)
         walk hero(2,left,2)
         walk hero(3,right,2)
         wait for hero(3)
         set hero direction(2,up)
         set hero direction(3,down)
         wait for hero(3)
         fade screen out
         play song(22)
         wait(85)
         fade screen in
         wait(1)
         show text box(9)
         wait for text box
         play song(26)
         walk hero(me,left,2)
         walk hero(1,right,2)
         walk hero(2,right,2)
         walk hero(3,left,2)
         wait for hero(3)
         walk hero(me,down,2)
         walk hero(1,up,2)
         walk hero(2,down,2)
         walk hero(3,up,2)
         wait for hero(3)
         resume caterpillar
         resume player
         end

plotscript, Splitup, begin
         suspend player
         suspend caterpillar
         walk hero to X(me,18)
         wait for hero(me)
         walk hero to Y(me,57)
         wait for hero(me)
         walk hero(me,up,1)
         walk hero(1,down,1)
         walk hero(2,right,1)
         walk hero(3,left,1)
                   wait for hero(3)
         set hero direction(me,down)
         set hero direction(1,up)
         set hero direction(2,left)
         set hero direction(3,right)
         wait for hero(3)
                   show text box(239)
         wait for text box
         set hero direction(me,left)
         wait for hero(me) # these wait for hero(me) I've added might not be needed
                   wait(10)
         set hero direction(me,right)
         wait for hero(me) # same as above
                   wait(10)
         show text box(240)
         wait for text box
         set hero direction(me,left)
                   wait for hero(me)
         set NPC position(2,18,55)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,up)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,right)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,down)
         wait for NPC(2)
                   wait(20)
         set NPC position(2,42,61)
         set NPC position(3,18,56)
                   wait for NPC(2)
                   wait for NPC(3)
         wait(20)
         set NPC position(3,43,61)
                   wait for NPC(3)
         set hero direction(me,down)
                   wait for hero(me)
         show text box(246)
         wait for text box
         walk hero(me,down,1)
         walk hero(1,up,1)
         walk hero(2,left,1)
         walk hero(3,right,1)
                   wait for hero(3)
         set hero direction(me,up)
                   wait for hero(me)
         resume caterpillar
         resume player
         end


Only the main hero is shown. The other party members do not show up.
Back to top
View user's profile Send private message
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Tue Jul 12, 2011 2:21 am    Post subject: Reply with quote

Is caterpillar party on? I think you have to set it to on for this to work.
Try this:

Code:
plotscript, CanusInn, begin
         set caterpillar mode(ON) 
         suspend player
         suspend caterpillar
         walk hero to X(me,10)
         wait for hero(me)
         walk hero to Y(me,4)
         wait for hero(me)
         walk hero(me,up,2)
         walk hero(1,down,2)
         walk hero(2,up,2)
         walk hero(3,down,2)
         wait for hero(3)
         walk hero(me,right,2)
         walk hero(1,left,2)
         walk hero(2,left,2)
         walk hero(3,right,2)
         wait for hero(3)
         set hero direction(2,up)
         set hero direction(3,down)
         wait for hero(3)
         fade screen out
         play song(22)
         wait(85)
         fade screen in
         wait(1)
         show text box(9)
         wait for text box
         play song(26)
         walk hero(me,left,2)
         walk hero(1,right,2)
         walk hero(2,right,2)
         walk hero(3,left,2)
         wait for hero(3)
         walk hero(me,down,2)
         walk hero(1,up,2)
         walk hero(2,down,2)
         walk hero(3,up,2)
         wait for hero(3)
         resume caterpillar
         resume player
         set caterpillar mode(OFF)
         end

plotscript, Splitup, begin
         set caterpillar mode(ON)
         suspend player
         suspend caterpillar
         walk hero to X(me,18)
         wait for hero(me)
         walk hero to Y(me,57)
         wait for hero(me)
         walk hero(me,up,1)
         walk hero(1,down,1)
         walk hero(2,right,1)
         walk hero(3,left,1)
                   wait for hero(3)
         set hero direction(me,down)
         set hero direction(1,up)
         set hero direction(2,left)
         set hero direction(3,right)
         wait for hero(3)
                   show text box(239)
         wait for text box
         set hero direction(me,left)
         wait for hero(me) # these wait for hero(me) I've added might not be needed
                   wait(10)
         set hero direction(me,right)
         wait for hero(me) # same as above
                   wait(10)
         show text box(240)
         wait for text box
         set hero direction(me,left)
                   wait for hero(me)
         set NPC position(2,18,55)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,up)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,right)
         wait for NPC(2)
                   wait(20)
         set NPC direction(2,down)
         wait for NPC(2)
                   wait(20)
         set NPC position(2,42,61)
         set NPC position(3,18,56)
                   wait for NPC(2)
                   wait for NPC(3)
         wait(20)
         set NPC position(3,43,61)
                   wait for NPC(3)
         set hero direction(me,down)
                   wait for hero(me)
         show text box(246)
         wait for text box
         walk hero(me,down,1)
         walk hero(1,up,1)
         walk hero(2,left,1)
         walk hero(3,right,1)
                   wait for hero(3)
         set hero direction(me,up)
                   wait for hero(me)
         resume caterpillar
         resume player
         set caterpillar mode(OFF)
         end


Not sure if this is the problem, if it doesn't work nudge us again eh Happy
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Wed Jul 13, 2011 7:46 am    Post subject: Reply with quote

*Nudge Nudge*

It still doesn't work. She shows up, but...she appears in the wrong place. She doesn't appear where I want her too. Also, in Canus Inn, the movement seems...flawed...for some reason. The hero goes diagonally. I find that...irregular.
Back to top
View user's profile Send private message
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Wed Jul 13, 2011 8:50 am    Post subject: Reply with quote

At which point does the hero go diagonally? At the start or later on? You migh want to just use a walk hero(me,direction,amount), is it possible to activate the inn from more than 1 location?

When you say "she" do you refer to an NPC in the second script? If that's the case then check the co-ords in custom in the map viewer and then the script.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Wed Jul 13, 2011 11:45 am    Post subject: Reply with quote

This is how to make a hero walk diagonally on purpose (in the hopes that it might help you understand why it would happen accidentally)

Code:

  walk hero(me, north, 1)
  walk hero(me, west, 1)
  wait for hero(me)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mswguest
Guest






PostPosted: Wed Jul 13, 2011 1:49 pm    Post subject: Reply with quote

I see lots of potential problems here.

First, we need to know more about what should be happening onscreen before, during, and by the end of, the Canus Inn script. Most importantly:

A) before this script is run, how should the party look? Should all of the heroes in the party be visible following the leader, or should only the leader be visible? If the other heroes are 'invisible', where onscreen should they appear? Behind the leader? On the same tile as the leader?

B) at what point in the script should the heroes 'split up'? As in, should they be following the leader (or invisible) up to a certain point in the script, and then start splitting off? Or should they behave independantly from the very beginning of the script?

Also, the script will certainly cause diagonal walking if the party is not full, because there are places where you use "wait for hero (3)" to wait for the heroes to reach their destinations. Since you have, in theory, no way of knowing which slots will be occupied, you should use:
Code:
variable (i)
for(i,0,3),do
  (wait for hero (i))

This will force the script to wait for (potentially) all four heroes.

You may also run into problems if the player has arranged his heroes like so:
slot0: Captain McAwesome
slot1: Lieutenant Fussypants
slot2:
slot3: Humpty Dumpty

Depending on your answers to the first two issues above, we may need to account for this possibility.

PS: I have not finished Canus Inn, and haven't even looked at Splitup yet. I'm hoping that understanding the issues here will make fixing both scripts very easy.
Back to top
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Thu Jul 14, 2011 8:51 pm    Post subject: Reply with quote

A) Caterpillar party is off in this game. They should spawn from the same tile.

B) I walk the hero to a certain X Y. When he arrives, he shall go up, and from the X Y he was walked to before, the heroes shall emerge from there, going their respective directions.
Back to top
View user's profile Send private message
mswguest
Guest






PostPosted: Fri Jul 15, 2011 5:12 am    Post subject: Reply with quote

I have to go to work in a few minutes, but here's some quick guidelines to try.

You should not turn caterpillar mode on, nor should you suspend caterpillar, until the main hero has already arrived at the spot you want all four heroes to 'spawn' from.

Once the hero has arrived at the spawning point, your script should look like:
[pseudocode]
turn on caterpillar
suspend caterpillar
set all hero positions to match the main hero
wait(1) (do not wait before this)
move all four heroes in their designated directions
wait for all heroes
continue on with the rest of script
...
at the end of the script, resume caterpillar, then turn it off
[/pseudocode]

PS: you may also need a suspend obstruction command, so the various heroes do not block each other from moving. I don't think this will be necessary, but I don't know[/code]
Back to top
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