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

On keypress scripts???

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Mon Jan 19, 2004 10:07 am    Post subject: On keypress scripts??? Reply with quote

I just wrote an on keypress script for jumping... but I dont know exactly how to trigger them...

scan code 30 is for A but I press button and nothing happens neh?
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Mon Jan 19, 2004 11:55 am    Post subject: Reply with quote

Well, when you make a on key press script you need to use "key is pressed (key)" in an if statement for it to work correctly. So:

Code:

include, scancode.hsi

define script (01, key press, none)

script, key press, begin

if (key is pressed(key:a)) then (
    #do the stuff you want below
)
end


So after you compile and import that script, you then need to go to the map you want to use it on and place that script in the "on key press" script section, which is in the general map options. This should work, so if it doesn't please post the script so we can take a look at it.
Back to top
View user's profile Send private message
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Mon Jan 19, 2004 3:50 pm    Post subject: Reply with quote

ok some how I got his mabugger workin with just

on keypress (30)
bla bla bala
end

BUT is there a way when you raise the z pixel to display a shadow at the bottom??? because when theres no shadow it looks like its just movig up.
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Jan 19, 2004 9:37 pm    Post subject: Reply with quote

You could create an npc below the hero quite easily..
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Jan 20, 2004 9:03 am    Post subject: Reply with quote

I was always under the impression that the OHR already had a shadow underneath you when you are lifted on the Z-axis. It works that way with vehicles anyway.

I try not to mess with keypress scripts that much. They drive me up the wall, too.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Jan 20, 2004 8:43 pm    Post subject: Reply with quote

That's vehicals only. BB, whats that coe you posted?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Thu Jan 22, 2004 10:39 am    Post subject: Reply with quote

How would a npace directly under it (no mader where the hero is on the map) and have it follow the hero!?

This is getting annoying. All I wanted was a few simple on keypress scripts to make some of my games more interactive (jumping, running, slashing etc.) I can't be;ive shadows are for vehicles only! If I didn't want a shadow I could have just use the walk NPC command!

I guess I'll just draw "Jump" walk abouts...
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Jan 22, 2004 1:18 pm    Post subject: Reply with quote

Like this.

Code:

script, jump, begin
 variable (shadow, height, height add)
 shadow := create npc (4) #change this number
 height := 0 #set this to the default x pixel offset on the map

 for (height add, 5, -5, -1) do (
  increment (height, height add)
  set hero z (me, height)
  put npc (shadow, hero x, hero y + 10)
  wait (1)
 )
end

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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