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

Smooth motion

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Jjkaybomb
Brunettes have more hair




Joined: 04 Sep 2003
Posts: 267
Location: Hunting with the mouse

PostPosted: Wed Sep 15, 2004 5:31 pm    Post subject: Smooth motion Reply with quote

I'm getting some weird stuff when I try to make things walk backwards. Am I just supposed to do it in a diferent order? Example: I do "set hero direction" in the direction they already are and do "walk hero..." but when I play the game under that plotscript they just get frozen in place.
_________________
A man once said to the Universe "Sir! I exist!"
"However," replied the Universe, "This does not create in me a sense of obigation."
~Stephen Crane
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Mad Cacti
Guest






PostPosted: Wed Sep 15, 2004 5:47 pm    Post subject: Reply with quote

You can't make npcs/heros walk backwards in this fashion, but I'm surprised that they get frozen.

You'd have to create a oop using put hero and set hero frame to achieve this, I think.
Back to top
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Wed Sep 15, 2004 5:48 pm    Post subject: Reply with quote

Try this, changing the arguments to fit your needs.

Code:
walk hero (0,left,1)
set hero direction (0,right)
wait for hero (0)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Wed Sep 15, 2004 5:56 pm    Post subject: Reply with quote

You can do all that, or:

Make a new hero walkabout set.
Flip the images backwards.
use setheropicture() to change the walkabout
Walk in the desired direction
change the hero picture back and set hero direction correctly

Just a suggestion
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Wed Sep 15, 2004 11:43 pm    Post subject: Reply with quote

JSH357 wrote:
You can do all that, or:

Make a new hero walkabout set.
Flip the images backwards.
use setheropicture() to change the walkabout
Walk in the desired direction
change the hero picture back and set hero direction correctly

Just a suggestion

why make a whole walkabout set?
If I did that in GameDesign101, there would be about 100 walkabout sets right now... as opposed to the 35 I've made and improvised with plotscripting commands.


I'd go with Uncommon's method of telling the NPC to move, then changing the NPC's direction, since the NPC's direction doesn't change back while it's walking. and it saves the hassle of scrolling through all these copies of the same walkabout.
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Thu Sep 16, 2004 8:35 am    Post subject: Reply with quote

Flamer: If you're only using the script once throughout the entire game, it makes perfect sense to use. What's it gonna increase the filesize by? 1 byte?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Fri Sep 17, 2004 12:05 am    Post subject: Reply with quote

well, since you're controlling the NPC/hero, it'd save memory and hassle from changing picture sets
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Fri Sep 17, 2004 3:00 am    Post subject: Reply with quote

You programmers never give up, I swear.

Let us normal people have our easy ways out.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
junahu
Custom Title: 45 character limit




Joined: 13 Jan 2004
Posts: 369
Location: Hull, England

PostPosted: Fri Sep 17, 2004 3:12 am    Post subject: Reply with quote

Just changing the hero's direction usually results in the hero 'sliding' from tile to tile which can be irritating and sometimes doesn't look right.
_________________
Back to top
View user's profile Send private message Send e-mail
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Sat Sep 18, 2004 7:44 pm    Post subject: Reply with quote

JSH357 wrote:
Flamer: If you're only using the script once throughout the entire game, it makes perfect sense to use. What's it gonna increase the filesize by? 1 byte?


each walkabout graphic takes about 1600 bytes,
hero graphics 5120 bytes
attack graphics 3750 bytes
weapon graphics 576 bytes
small enemy graphics 578 bytes
medium enemy graphics 1250 bytes
large enemy graphics 3200 bytes

tilesets and backdrops, 64 k each

correct me if I am wrong.

thats totally off topic,

now for the topic, I would go with uncommon's idea, its saves time, and less complecated.
_________________
Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
no_shot
Surpasses you in poetical prowess




Joined: 28 Apr 2003
Posts: 300
Location: On the road to perfection.

PostPosted: Tue Jan 11, 2005 7:15 pm    Post subject: Reply with quote

Try something like this.
script, walkbackwards, begin
suspend player
variable (i)
variable (j)
variable (f)
f:=0
for (i, 1, 5, 1) do, begin
for (j, 1, 4, 1) do, begin
put hero(me, (hero pixel x--j), hero pixel y) #might have to modify these depending on where you want the hero to move...
wait (5)
end
if (f==1) then, f:=0 else, f:=1
set hero frame (me, f)
end
resume player
end

_________________
Play Horrible Fantasy NOW!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Jan 11, 2005 10:46 pm    Post subject: Reply with quote

Whoops.
Code:

script, walkbackwards, begin
  suspend player
  variable (i)
  variable (f)
  f := 0
  for (i, 1, 5, 1) do, begin
    put hero(me, (hero pixel x--4), hero pixel y)
    f := f,xor,1
    set hero frame (me, f)
    wait (1)
  end
  resume player
end

Walks to left, regardless of direction facing.
But not that this script wopuld let you walk backwards through walls and npcs, so only use where this can't happen.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




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

PostPosted: Fri Jan 14, 2005 4:20 pm    Post subject: walking backwards Reply with quote

As uncommon correctlys suggested, you should do:

Code:

walk hero (0,left,1)
set hero direction (0,right)
wait for hero (0)


If this does not work, you have found a bug and should report it on bugzilla
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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