View Full Version : Skateboarding trick need help please :) !
xxledzeppelin2x3
10-25-2009, 12:49 PM
ok first off thank you for looking at my post! but my problem is, i am making a skateboarding game and so far all is well, i have 4 tricks that my guy can do..
1. Ollie
2. Kick Flip
3. Front Side 180
4. 360 Shove it
in order to do these tricks you press space to ollie and while in the air you press another button to do a trick (tricks 2-4)
but now i am wanting to make another trick called the 360 flip (tre flip) and i can't do it! the trick involves, do together: turn 2 revolutions and roll 1 revolution.. when i do it, it makes the skateboard fling around and not land flat? i can't understand why? pleaseee help! HERE IS A LINK OF THE TRICK!
http://www.youtube.com/watch?v=MnZM-93k_DU&feature=related
x2495iiii
10-25-2009, 04:56 PM
You'll probably need to put a pivot object in the center of the skateboard and have it turn and roll as seen by the pivot object. You could also just have the skateboard stand up at the end of the trick (stand up is a method near the bottom of the method list).
xxledzeppelin2x3
10-25-2009, 05:40 PM
When i click stand up the skateboard turns so it is in between his legs and what do you mean by a pivet object? if this is what you mean i tried to put a cone with the opacity of 0 in the middle of the board and put as seen by and it still did the same thing :(
x2495iiii
10-25-2009, 08:41 PM
That is what I meant, but it should work if done properly, unless the problem is with the change in orientation when rolling (which is more difficult to fix).
Go ahead and upload your world and I'll see which one it is, alright?
xxledzeppelin2x3
10-26-2009, 12:04 AM
thank you soo much for the help, here it is,the cone is in the middle of the board already and opacity is set to 0, and btw nice job on resident penguin it is sweet! :)
xxledzeppelin2x3
10-26-2009, 12:06 AM
also do you how i might be able to make my guy skate up ramps??
x2495iiii
10-26-2009, 01:34 AM
That'll be tough, since there's really no function to detect when the guy is on the ramp and no built-in way to make him follow the course of the ramp upwards. Those two things can be created, though by using combinations of the built-in functions. I'll see if I can demonstrate when I find out what the skateboard problem is.
x2495iiii
10-26-2009, 03:30 AM
Here's the world with the tre flip trick and a VERY CRUDE ramp-turning method (it's crude because the only way it works is if you skate forward to exactly the cener of the ramp, which is why I moved the skater so he's already pointed at the ramp's center). Hopefully it'll give you some idea of how to make a proper ramp-turning method.
By the way, have you tried version 3.1 of Resident Penguin yet? That's my best work yet.
xxledzeppelin2x3
10-26-2009, 07:02 AM
wow! thanks soo soo much, right now im gonna download 3.1! how long did it take you to code that?!?! that is sooooo much!
xxledzeppelin2x3
10-26-2009, 07:57 AM
i guess i still have a long way to go in computer programming because i dont even understand what u did to make the skateboard go up the ramp let alone finish it! lmao, thanks anyways
x2495iiii
10-26-2009, 02:41 PM
It took about 2 hours, mostly because of trial and error (sometimes that's what you have to work with)
Here's what I did:
There's a dummy object called rampFront which marks the front of the ramp, and a dummy object called frontWheel which marks the front wheels of your board. The method rampCheck checks to see if the wheel dummy is very close to the ramp dummy and in front of it (meaning that the board has skated up to the ramp and is trying to skate up it). Now here's the tricky part: when this happens, rampCheck starts a series of while loops which check to see how close the skater is the the ramp and roll him based on how far away he is from the front of the ramp so that he moves properly (this was the trial and error part. I didn't have the angle of the ramp, so I had to test different numbers for him to roll properly). Since there are several while loops, on right after the other, the next loop only starts working when the one before it stops, meaning he rolls differently at different points on the ramp (which is realistic, considering the ramp's curvature). Essentially the same thing occurs for the end of the ramp, where a method is constantly checking to see if the skater is close enough to the end of the ramp to have him stand up (go back to skating upright) and move down to the ground.
Apologies, that was sort of complex. I just tought of a simpler method which should work fine. I'll post it shortly.
xxledzeppelin2x3
10-26-2009, 03:26 PM
wow! how long have you been working with alice?? because you are very good at what you do haha. the help you are giving me is much appreciated because im kind of novice at alice programming ive been working with it for only about 3 months. This is my first attempt at making a game because, im in a programming class and we started to learn a little bit about events so i just decided to go ahead and do my final project while i was bored over the weekend and this is my result! so, again, thank you soo much for dedicating your time when u you could be making resident penguin 4.0 (; ! btw 3.1 is insane!!!! you are the next bill gates!