Key_UP?

Talk about making games.

Key_UP?

Postby ingsan » Mon Nov 17, 2003 4:05 pm

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... :?:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Tue Nov 18, 2003 1:04 am

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
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Ingrid

Postby ingsan » Fri Nov 21, 2003 10:31 am

ThanX Maxslane!
By the way, it's ingrid.Got to log with another username.Don't ask me why :oops:

See ya...
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

i've tried...

Postby ingsan » Fri Nov 21, 2003 2:40 pm

"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!
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron