Forum Topic: change tween thing

(177 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

ShqweezPerduptins

Reply To Post Reply & Quote

Posted at: 8/17/06 11:50 AM

ShqweezPerduptins EVIL LEVEL 04

Sign-Up: 08/16/06

Posts: 13

how can i make it when i click an object that is tweening up it will fall down

like a person moving up a ladder but when you click him he will fall

i tried to do it but when he fell he didnt fall where i clicked him at


None

64

Reply To Post Reply & Quote

Posted at: 8/17/06 01:58 PM

64 DARK LEVEL 18

Sign-Up: 02/16/04

Posts: 3,871

onClipEvent (load) {
climbing = 1;
speed = 2;
fall = 0;
gravity = 1.5;
}
onClipEvent (enterFrame) {
if (climbing == 1) {
_y -= speed;
} else if (climbing == 0) {
fall += gravity;
_y += fall;
}
}
on (press) {
if (climbing == 1) {
climbing = 0;
}
}

Copy and paste that into a movieclip.
speed is the speed of which the movieclip climbs the ladder.
gravity is the amount of gravity for the thing to fall once clicked (1-2 is a reasonable value).

ActionScript pwns tweening!
BBS Signature

None

The-Buck4

Reply To Post Reply & Quote

Posted at: 8/17/06 02:01 PM

The-Buck4 NEUTRAL LEVEL 03

Sign-Up: 10/10/04

Posts: 4

At 8/17/06 11:50 AM, ShqweezPerduptins wrote: how can i make it when i click an object that is tweening up it will fall down

like a person moving up a ladder but when you click him he will fall

i tried to do it but when he fell he didnt fall where i clicked him at

Your emo game sucks


All times are Eastern Standard Time (GMT -5) | Current Time: 09:12 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!