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

Freemovement possible?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
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...

PostPosted: Sat Jan 27, 2007 11:08 pm    Post subject: Freemovement possible? Reply with quote

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
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: Sat Jan 27, 2007 11:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
J.A.R.S.
In umbram deo, ex nihilo...




Joined: 11 May 2005
Posts: 451
Location: Under the rainbow...

PostPosted: Sun Jan 28, 2007 8:25 pm    Post subject: Reply with quote

What?!?! just wow. Thanks a lot Big grin I'll try and figure out the collision mode with that... I have yet to get comfy with hss again Wink thanks again moogle1
Back to top
View user's profile Send private message
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