Page 1 of 1

Key_UP?

PostPosted: Mon Nov 17, 2003 4:05 pm
by ingsan
I need some Guys! :cry:
I would like my character("main_charact") to change properties
(ie KEY_UP when he walks is meant for Jump,and when he climbs up
a ladder or a wall,Key_Up then is meant for Climbing)
when he changes "animation" and not Actor.It would be simpler to replace the
character itself by another actor but i would like it to be more automatic
ie using code...But,well...I don't Know the code!It must have something to do
with key remap or something-hum,so clever from me-But still I wouldn't know how to do that! :? :cry:

Could u please help,guys..anyone... :?:

PostPosted: Tue Nov 18, 2003 1:04 am
by makslane
Add a new var "climb" to your actor
Set climb = 0 in CreateActor with Script Editor
When actor collide with ladder, set climb = 1
When actor finishs collision with ladder, set climb = 0

On key up, set this Script Editor action:
if(climb)
{
y = y - 1; //Actor up
}
else
{
//Jump or other action
}

Ingrid

PostPosted: Fri Nov 21, 2003 10:31 am
by ingsan
ThanX Maxslane!
By the way, it's ingrid.Got to log with another username.Don't ask me why :oops:

See ya...

i've tried...

PostPosted: Fri Nov 21, 2003 2:40 pm
by ingsan
"Add a new var "climb" to your actor
Set climb = 0 in CreateActor with Script Editor
When actor collide with ladder, set climb = 1
When actor finishs collision with ladder, set climb = 0

On key up, set this Script Editor action:
if(climb)
{
y = y - 1; //Actor up
}
else
{
//Jump or other action
}"

I tried this code and it actually works.But not the way i would like it to.
in my key down(when he jumps) "Repeat" is disable and so when he has to climb,
i have to press again and again on the UP-button so that he reaches the top.on the contrary
i would want him to climb when i have my finger on the up-button.
Anyway, i'm sending u my .ged by mail.i forgot to the last time...sorry.
You'll see that it's a little bit messed up...be tolerant...please!
To end,...GE's Great!