Page 2 of 2

Re: shooting

PostPosted: Sat Mar 24, 2012 10:43 am
by skydereign
What tutorial were you looking at? That looks positively unsightly, and I can understand why you are having trouble. I would recommend starting from scratch, and using a different approach. When you do implement code you see from others, make sure to know what it does before you add it. That way you're able to work with the code if you run into problems. What I usually suggest is the method outlined in the following link (I find it the clearest method as well as most dynamic way of controlling your player).
http://game-editor.com/State_Method

Re: shooting

PostPosted: Sat Mar 24, 2012 5:06 pm
by yourownskills
disregard any of my previous questions, I decided to start learning code. so im going through the forums and trying to start at the beginning.

Re: shooting

PostPosted: Sat Mar 24, 2012 7:51 pm
by yourownskills
so im going through one of the tutorials in the forum. I have the player moving left and moving right... i have a jump animation that faces right....when im looking left by pressing the left arrow down input...can i use the same Jump Animation that faces right for when im looking left? or do i need to make a seperate Facing Left Jump animation?

KeyDown Left

x-=10;ChangeAnimation("Event Actor", "charLeftWalk", FORWARD);

}

Re: shooting

PostPosted: Sat Mar 24, 2012 9:54 pm
by yourownskills
Hey sky, im looking at that state method. and im lost right off the bat.... the Switch Var,,,,, do i create that in the global code?

Re: shooting

PostPosted: Sat Mar 24, 2012 10:47 pm
by skydereign
Okay, that is just describing how a switch statement works. When you use a switch statement, just make sure the variable in the switch statement is an int, and is declared in global space. When you get to the actual state system, you will need either a global variable called state, or an actor variable.

Re: shooting

PostPosted: Sun Mar 25, 2012 4:44 pm
by yourownskills
Gravity doest work for me, here is what I have..


keydown Ctrl script editor yvelocity=-10;

my player is parented to a Collision Actor....the collision actor has the collision on it with a physical response for the tile set that im using...


but i press Control to jump and it just goes and goes...it doesnt listen to the collision actor

Re: shooting

PostPosted: Sun Mar 25, 2012 6:06 pm
by yourownskills
i got it to work