Hey Clickteam,
Is there a tutorial or example of an object bouncing on a trampoline, with natural controlled gravity and positional falling? Thanks Clickers!
Hey Clickteam,
Is there a tutorial or example of an object bouncing on a trampoline, with natural controlled gravity and positional falling? Thanks Clickers!
There are many different ways. One way is to use the platform movement extension. It allows you to set an object's Y velocity, which is all you really need.
If it were me, I wouldn't use any movements or extensions. It's very easy to get an object falling with gravity. Just give it two alterable values, YReal and YVel, then do the following:
Start of frame -->
Set YReal of "Active" to Y("Active")
Always -->
Add 0.1 to YVel("Active")
Always-->
Add YVel("Active") to YReal("Active")
"Active" overlaps "Trampoline" + YVel("Active") > 0 -->
Set YVel("Active") to YVel("Active") * -1
Always-->
Set Y of "Active" to YReal("Active")
The reason for the nonsense with YReal is because we need to store a float value for smooth movement. Somehow Clickteam still hasn't added support for float X/Y coordinates (as far as I know), so this cumbersome extra step is always necessary for most custom object behaviors.
Ehm, may I go completely off-topic here?
@UltimateWalrus: your website is insanely cool :O
...and I've probably messed things with a comment (on your rocking UFO object) containing ">:D"
resulted in >:D
sorry >:)
think of the ball as a platformer. google platformer engine. and replace the character with a ball. remove controlls. voila.
-or-
use MMF built in movements (like directional, physics or platformer)
-or-
write your own and play arround with adding/substracting to X/Y values/positions.
Back on topic: would this same method mentioned allow for say an effect in platform game where -
the character could knock enemy into air, jump and hit a 2nd time - but have everything PAUSE right before enemy is sent flying.
Similar to Super Smash Bros...or even allow pauses of varying degrees to give effect of powerful hit?
I've always wanted to see an example of this done... anyone know of one or willing to put something together?
I can't stress enough how primitive this example is - but it at least shows some of the basic idea!
argh, just noticed I messed here too... damn emoticons
should have been --->Quote:
...and I've probably messed things with a comment (on your rocking UFO object) containing ">:D"
resulted in >:D
sorry guys, last off-post here!Quote:
...and I've probably messed things with a comment (on your rocking UFO object) containing "> : D"
resulted in [..messed ascii charcode..]
Btw, very nice example DaveC, really feels like knocking in mid-air!
Thanks DaveC!
Thanks very much for the kind words :] I just made a post about my website in the off-topic community forum so people can talk about it there if they want.
http://community.clickteam.com/threads/94940-New-Ultimate-Walrus-website
Regarding your comment on UFS... I think I fixed it? Just let me know what you meant to type and I can change it :P My comment posting script is probably not perfect.
That punch example is pretty cool! One thing to note is that if you want all of the action in the entire game to stop for a fraction of a second or more, you can keep your events in a giant group, and deactivate it temporarily to pause things.
A combination of the punch example and the "giant groups" could make for a nice feature in a platform game. Make the player feel really powerful upon achieving certain combos. Thanks for the tip!