 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Kizul Emeraldfire Type: Cyber Dragoon

Joined: 26 Mar 2004 Posts: 229
|
Posted: Wed Jul 26, 2006 12:28 am Post subject: Help with the Three-Framed Walking script |
|
|
The one by PCI from Moogle1's, that is. For some reason, when I use the T-F-WS, it breaks the Suspend Player command. I don't know why that is. I'm making an RPG with four heros — so I modified the T-F-WS so that all four heros would animate and stuff:
Code: | script, KeyPress, begin
while (MoveKeyIsPressed)
do, begin
walk hero (0,WhichDirection,1)
wait (2)
set hero frame (0,1)
set hero frame (1,1)
set hero frame (2,1)
set hero frame (3,1)
wait (2)
if (MoveKeyIsPressed)
then, begin
set hero picture (me,get hero picture (me) + 1)
set hero frame (0,0)
set hero frame (1,0)
set hero frame (2,0)
set hero frame (3,0)
wait (1)
walk hero (me,WhichDirection,1)
wait (2)
set hero frame (0,1)
set hero frame (1,1)
set hero frame (2,1)
set hero frame (3,1)
wait (2)
set hero picture (me,get hero picture (me) -- 1)
set hero frame (0,0)
set hero frame (1,0)
set hero frame (2,0)
set hero frame (3,0)
wait (1)
end
else, begin
wait (1)
end
set hero frame (0,0)
set hero frame (1,0)
set hero frame (2,0)
set hero frame (3,0)
end
end
end |
(sorry it's so long. The rest of the script is here, just replace the KeyPress script from there with this one.) Anyway, here's the script that I was using (minus a few trivial things like stopping music and ambient SFX and things) where the Suspend Player command breaks:
Code: | script, wall, begin
suspend player
suspend catapillar
walk hero to X (0,4)
walk hero to Y (0,6)
walk hero to X (1,3)
walk hero to Y (1,7)
walk hero to X (2,4)
walk hero to Y (2,7)
walk hero to X (3,5)
walk hero to Y (3,7)
set hero direction (0, up)
set hero direction (1, up)
set hero direction (2, up)
set hero direction (3, up)
wait (115)
resume catapillar
resume player
end |
Anyway — sould someone help me out here? It would be VERY greatly appreciated. :D *nodnod* I currently have the T-F-WS disabled so I can continue scripting, but I really want to use it. :) |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Jul 26, 2006 8:37 am Post subject: |
|
|
Since you are scripting your own movement, yes, the suspendplayer command will have no effect.
You need to use either a tag or a global variable to disable the T-F-WS when needed:
Code: |
script, KeyPress, begin
if (check tag(tag:disable walking) == OFF) then,begin
while (MoveKeyIsPressed) do, begin
#blah, blah, blah...
end # while
end # if
end # script
|
Code: |
script, wall, begin
suspend player
suspend catapillar
set tag(tag:disable walking, ON)
walk hero to X (0,4)
walk hero to Y (0,6)
walk hero to X (1,3)
walk hero to Y (1,7)
walk hero to X (2,4)
walk hero to Y (2,7)
walk hero to X (3,5)
walk hero to Y (3,7)
set hero direction (0, up)
set hero direction (1, up)
set hero direction (2, up)
set hero direction (3, up)
wait (115)
resume catapillar
resume player
set tag(tag:disable walking, OFF)
end
|
|
|
Back to top |
|
 |
Kizul Emeraldfire Type: Cyber Dragoon

Joined: 26 Mar 2004 Posts: 229
|
Posted: Wed Jul 26, 2006 1:41 pm Post subject: |
|
|
Yay, that worked! :D Thanks, SPAM Man! |
|
Back to top |
|
 |
|
|
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
|