Ah of course lol but if you allready know variables and how to do the "single jump" where the player can't jump infinately then skip to the 2)
1) All right so it's a paltformer so there will be jumping. On the keydown of whatever key you would like to be jump choose script editor. In script editor there will be a click box in the bottom right hand corner. Click it, then click add. Name the variable jump, then click add then enter this code
- Code: Select all
if(jump == 1)
{
jump = 0;
yvelocity -= 10;
}
change ten if you need to more to make the player jump higher and less for lower
Then choose collision, then choose topside of ground then enter this code
- Code: Select all
jump = 1;
These two codes combined will make the player be able to jump one time at a time, just like in real life. and this variable "jump" will help you set up your shaking screen
2)On the top of the screen where you have File Add Actor ect. there will be a tab for path
click it and add a path name the path shake then choose 100 or so for the frames, then make three points and make sure they are straight going like this
* &
0----------0
where the * is points 1 and 3 will be the & is where point 2 will be
then on the collision on top side of ground(the same script editor from earlier)add a changepath action so the whole code will look like this
- Code: Select all
jump = 1;
ChangePath("View", "shake", BOTH_AXIS);
then for the view have a path finish event that changes the path to none
I hope that makes sense and helps, if your confuse then just ask, that's alot to take in
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.