shooting

Non-platform specific questions.

Re: shooting

Postby skydereign » Sat Mar 24, 2012 10:43 am

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
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: shooting

Postby yourownskills » Sat Mar 24, 2012 5:06 pm

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.
yourownskills
 
Posts: 40
Joined: Thu Mar 22, 2012 5:02 pm
Score: 1 Give a positive score

Re: shooting

Postby yourownskills » Sat Mar 24, 2012 7:51 pm

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);

}
yourownskills
 
Posts: 40
Joined: Thu Mar 22, 2012 5:02 pm
Score: 1 Give a positive score

Re: shooting

Postby yourownskills » Sat Mar 24, 2012 9:54 pm

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?
yourownskills
 
Posts: 40
Joined: Thu Mar 22, 2012 5:02 pm
Score: 1 Give a positive score

Re: shooting

Postby skydereign » Sat Mar 24, 2012 10:47 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: shooting

Postby yourownskills » Sun Mar 25, 2012 4:44 pm

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
yourownskills
 
Posts: 40
Joined: Thu Mar 22, 2012 5:02 pm
Score: 1 Give a positive score

Re: shooting

Postby yourownskills » Sun Mar 25, 2012 6:06 pm

i got it to work
yourownskills
 
Posts: 40
Joined: Thu Mar 22, 2012 5:02 pm
Score: 1 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest