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

How do I make jump an Npc or and a hero ?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Mar 27, 2005 11:46 pm    Post subject: How do I make jump an Npc or and a hero ? Reply with quote

I would like Npcs or and heroes to jump because they are very much surprised. Does somoene know if there is a way to do that ? I am searching to compare different plotscripting commands so feel free to post any scripts that you think would be a good idea to do that !

As always thanks very much for the help !
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Mar 28, 2005 8:51 am    Post subject: Reply with quote

set hero z

and

set npc z
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Mar 28, 2005 10:26 am    Post subject: Reply with quote

Ooh, useful!

Code:
set hero z(hero, z)


and

Code:
set npc z(npc ref, z)


To use these, you would have a script like this:

Code:

# put some supprising text box here!!!!!!1one
# hero freaks out:
set hero z(me, 4)
wait(5) #adjust this to however long you want the jump to last.
set hero z(me, 0)

_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Mon Mar 28, 2005 2:31 pm    Post subject: Reply with quote

First of all, there is no "set npc z".
Second, another possibly smoother way to do it is with the "walk" command.

Code:
#say we're trying to make hero 0 jump.
set hero speed (0,10) #we want his jump to be very fast.
walk hero (0,up,1)
#let's say he's facing west, eh?
set hero direction (0,west) #you'll want the directional argument here to be the same as whatever way the hero was facing before.
wait for hero (0)
walk hero (0,down,1)
set hero direction (0,west)
wait for hero (0)

Alternatively, you could always make it an autonumber script.
Code:
define script  (autonumber,jump,1,0)

script,jump,who,begin
 variable (d)
 d := hero direction (who)
 set hero speed (who,10)
 walk hero (who,up,1)
 set hero direction (who,d)
 wait for hero (who)
 walk hero (who,down,1)
 set hero direction (who,d)
 wait for hero (who)


And to use that for hero 0, you'd just use
Code:
jump (0)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Mon Mar 28, 2005 3:04 pm    Post subject: Reply with quote

Ah, so you're right. set hero z is a real command though.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Mar 28, 2005 3:57 pm    Post subject: Reply with quote

Isn't there? Hmm, there should be. I'll mention it to someone doing that type of thing...
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
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: Wed Mar 30, 2005 2:38 am    Post subject: Reply with quote

I remember asking James years ago. There is no set npc z because individual npcs don't have a z value.

Anyway, unc, you are stuck in times past before pixel placement commands were added.

Also, it wasn't exaclty the same question but this was asked like a week ago
http://gilgamesh.dnsalias.org:8080/wiki/ohrrpgce/index.php/How_do_I_make_an_NPC_look_like_it%27s_jumping%3F
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Wed Mar 30, 2005 3:24 am    Post subject: Ok... There are various ways to do it ! Reply with quote

Why does the topic on the faq website is called "how do I make an npc look like it's jumping? " The topic should be how I make a npc jumping ?

When you made tests: are they differences when you make an hero jumping using the set hero (z ) command and put hero (hero, hero pixel x (hero), hero pixel y (hero)--pixels)

Thank you all for the help! It's very usefull !
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Wed Mar 30, 2005 5:15 am    Post subject: Reply with quote

Technically yes. However, for most purposes, no.

Now, you have to use a bit more magic to get a hero to jump *over* something. You need to "suspend obstruction" (I think, someone correct me if I'm wrong) so that the hero can move through walls, and thus "jump over" something.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Wed Mar 30, 2005 10:47 am    Post subject: Reply with quote

Damned kids and your new-fangled pixel movement! Why, back in my day, we moved sprites a tile at a time, and we liked it, too!

But seriously, like I said, it's a smoother method. To have it move one pixel at a time would be impractical, and there's absolutely nothing wrong with using tile-based methods.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
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