Page 1 of 1

serious help!!!

PostPosted: Mon Aug 13, 2007 11:44 pm
by superhydrosonic
I got 7 questions.

#1
How do I make my guy stop jumping every time I press jump?
I checked all over the forums and it did nothing :evil:

#2
how do I make it so when my guy dies he turns up at the
last checkpoint he hit?

#3
Is there a way to make the Text scroll with the character?

#4
Can I add up the score at the end like
Example
time: 2039
points:5902
ect. and adds them all up to the total score?
#5
can I make it that when i grab something and when I get hit it flies away?
#6
Can I make scenes/mini movies?
#7
Can I play music right when the game starts? (at the title screen)

I'd be extremely greatful if someone answered most of my questions or alot of people answer at a time!!!!!!

PostPosted: Tue Aug 14, 2007 12:26 am
by d-soldier
For Jumping:
http://game-editor.com/forum/tp-3985-Ho ... rmal-.html
Checkpoints:
http://game-editor.com/forum/viewtopic. ... checkpoint
Text scroll with character??? Parent it to the player.

This will start you off, and also be sure to avoid using the cliche "NEED HELP!" topic names in your posts, so people who use the SEARCH button can find what they are looking for based on the topic title alone.

PostPosted: Tue Aug 14, 2007 1:33 am
by superhydrosonic
Thanks!!
but the jumping thing doesn't work!!
I did all the steps too!

PostPosted: Tue Aug 14, 2007 1:58 am
by Astro Lemur
#7
Can I play music right when the game starts? (at the title screen)


What i usually do is put a filled region actor that fills the view and put events for mouse enter destroy the region and play music.

PostPosted: Tue Aug 14, 2007 2:43 am
by d-soldier
The reason he can keep jumping is because the keydown event isn't limited. Heres what you need to do:
1) Click up on SCRIPT menubar, then add an actor variable called "canjump".

2)On your players events, add a collision event (relating to the ground) with a script editor that says:
"canjump = 1;"
then add a collision-finish event: (in case you WALK off an edge)
"canjump=0;"


3)On your players keydown event (for whatever your jump button is)make the script say:
if(canjump==1)
{
yvelocity = -8;
canjump=0;
}

4) And that ought to do it! Basically it makes your player only be able to jump if his feet are on the ground. Keep in mind that if you add any other ground objects/platforms/etc. you will need to have that collision event for the player with each of them too.

PostPosted: Tue Aug 14, 2007 3:59 am
by DilloDude
This doesn't actually stop him fro jumping if he is in the air. It covers most cases, and is simple, so often it can be fine, but in the case that you walk off the edge of a platform (without jumping) you can still jump again in the air.

PostPosted: Tue Aug 14, 2007 5:08 am
by d-soldier
updated the previous instructions with a "collision-finish" event (i think thats what it's called) to fix that problem.

PostPosted: Tue Aug 14, 2007 5:23 am
by DilloDude
I'm not sure how well collision finish will work, because of the physical response. I've had problems with it before but whether it may have been fixed I don't know.When using collision finish, you certainly can't jump in the air, but not alwys on the ground either. A good test is to have an actor which is constantly displaying the canjump variable. You'll probably find it constantly flicking between 0 and 1. Two solutions I've used are some sort of 'time' method (whether a timer or a variable counter) and using a sensor (although in some cases the sensor hasn't detected the collision finish, resulting in problems). Some time I'd like to write a document of some sort about various methods, and why some don't work, or why some are better than others. Until then, think about it, and see what you can come up with.

PostPosted: Tue Aug 14, 2007 11:00 pm
by DocRabbit
Seems like you could just check for yvelocity==0, allow jump, if yvelocity!=0, don't allow jump. This of course if your player is navigating on a flat plane.

**update** This would work but gravity methods would have to be rethought and you still need a tracker for if he jumped, so doesn't save anything. Although I did notice if you track yvelocity, even on the ground, it bounces back and forth constantly, not an even 0 like you would think.

PostPosted: Wed Aug 15, 2007 12:30 am
by DocRabbit
#2 possible way to do it.

Make two variables to store x and y positions of last checkpoint. You could do this on a nonrepeating collision with the checkpoint. The when player dies, Create him at those x and y values.