 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
J.A.R.S. In umbram deo, ex nihilo...

Joined: 11 May 2005 Posts: 451 Location: Under the rainbow...
|
Posted: Sat Jan 27, 2007 11:08 pm Post subject: Freemovement possible? |
|
|
I haven't been around for a while so I'm not sure if this possibility was brought up by new plotscripting advances: Is there a way to script freemovement, and if so, using what command? (though I doubt any command uses the pixel argument right?)
By free movement, I'm refering to the way the heroes move in some games such as Chrono Trigger, aka, not a full square each time you press a key... |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Jan 27, 2007 11:33 pm Post subject: |
|
|
Yeah, it's possible. Here's a rudimentary script snippet to give you an idea.
Code: |
while (done==false) do (
#keypress/movement checks
if (keyispressed(key:up)) then (y:=y--5,setnpcdirection(0,up))
if (keyispressed(key:down)) then (y:=y+5,setnpcdirection(0,down))
if (keyispressed(key:left),and,keyispressed(key:right)==false) then (x:=x--5,setnpcdirection(0,left))
if (keyispressed(key:right),and,keyispressed(key:left)==false) then (x:=x+5,setnpcdirection(0,right))
#bounds checks
if (x<<19*20) then (x:=19*20)
if (y<<14*20) then (y:=14*20)
if (x>>42*20) then (x:=42*20)
if (y>>26*20) then (y:=26*20)
#end of cycle
puthero(me,x,y)
wait(1)
)
|
Note that this doesn't check for running into walls. _________________
|
|
Back to top |
|
 |
J.A.R.S. In umbram deo, ex nihilo...

Joined: 11 May 2005 Posts: 451 Location: Under the rainbow...
|
Posted: Sun Jan 28, 2007 8:25 pm Post subject: |
|
|
just wow. Thanks a lot I'll try and figure out the collision mode with that... I have yet to get comfy with hss again thanks again moogle1 |
|
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
|