The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:39 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 3 posts ] 
[Request] Standing 
Author Message

Joined: Wed Nov 26, 2008 10:43 am
Posts: 16
Hello there, I want to create a smash bros fan game. I have decent knowledge of Action script 2.0. I just can't remember the commands, But any-who, I want to know how to code a stand, Like a character standing. But the problem is, It will be facing right. I have a run animation that's moving to the left, I want the the stand to respond and flip to the left. But this isn't the full problem. Most of the moves I sprited are facing right. How will i make it so that when he runs to the left, All the moves will be played to the left? Then if he moves to the right, All animations are going to be played in the right. If the certain keys are pressed. Get what I'm saying?


~Thanks
Clyde

Hope i didn't get you too confused...


Mon Aug 17, 2009 1:56 pm
User avatar

Joined: Mon Aug 11, 2008 1:09 pm
Posts: 166
Location: England lol
Gender: Male
Currently Playing: Minecraft
What I do is for the sprites first frame, create a variable to store a variable that records something called the _xscale. So something like this.
Code:
facing_right = _xscale;


To then find out the _xscale of facing left use.
Code:
facing_left= -_xscale;


Anytime I then want to flip it to the left or back to the right again I can then just use these.
Code:
//Face Left
_xscale = facing_left;
//Face Right
_xscale = facing_right;


Tue Aug 18, 2009 8:33 am
WWW

Joined: Wed Nov 26, 2008 10:43 am
Posts: 16
The fact is, Is that those variables will stay as left or right. It won't be able to switch by itself. Thats my giant problem on coding attacks and if the character moves left the attacks will be played left. But.....If you mean coding sperately, Left animations and right. It might work....But i don't know how it will will work.


Tue Aug 18, 2009 12:28 pm
Display posts from previous:  Sort by  
 [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.