Graphics Fans
Gaming Tutorial (how to walk) - Printable Version

+- Graphics Fans (https://graphicsfans.createmybb.com)
+-- Forum: Programming & Tutorials (https://graphicsfans.createmybb.com/forumdisplay.php?fid=19)
+--- Forum: Tutorials (https://graphicsfans.createmybb.com/forumdisplay.php?fid=33)
+---- Forum: Macromedia Flash (https://graphicsfans.createmybb.com/forumdisplay.php?fid=36)
+---- Thread: Gaming Tutorial (how to walk) (/showthread.php?tid=23)

Pages: 1 2


Gaming Tutorial (how to walk) - Ghettobird - 06-20-2006

heya ^_^ had nothing to do so i'll post a game tutorial


how to walk?

its very easy:

draw a character u want to have (for beginners start with a dot or something)

now "convert it to a movieclip"

this is: selecting the whole graphic u just drawn and rightClick->convert to symbol

now select movieclip

after that again right click and now press "actions"

now you'll see a screen all white

in the screen put: (for birdeye graphics only! else remove all the _rotation things)

Code:
onClipEvent(load){
speed = 8;
}
onClipEvent(enterFrame){
if (Key.isDown(Key.UP)){
this._y -= speed;
_rotation = 0;
}
if (Key.isDown(Key.DOWN)){
this._y += speed;
_rotation = 180;
}
if (Key.isDown(Key.LEFT)){
this._x -= speed;
_rotation = 270;
}
if (Key.isDown(Key.RIGHT)){
this._x += speed;
_rotation = 90;
}
}

as u can see the
Code:
if (Key.isDown(Key.UP)){


is for which key u want for the following option:
Code:
this._y += speed;

this means y (vertical) - (up) speed(is 8)

so what it does when press the up arrow key it walks vertically up with speed 8

Code:
_rotation = 0;

this is which way the char turns to with the key up it has to face up so that will be 0

downwards is 180

thats half of a round (full round is 360)



well i hope this helps Smile

have fun!


(Credits to Rochy And Flash 8)






RE: Gaming Tutorial (how to walk) - DarkstaR - 06-20-2006

Nice tut Roch ;D, but i dont wanna dl Flash 8 just to test it =\


RE: Gaming Tutorial (how to walk) - Ghettobird - 06-20-2006

thnx Smile

its also compatible with Flash mx and Flash 2004


RE: Gaming Tutorial (how to walk) - Hexo - 06-20-2006

Nice, just one problem.. when I press right it goes up :o


RE: Gaming Tutorial (how to walk) - Ghettobird - 06-20-2006

oh whoops forgot to change the y in x srry :$ (fixed now) thnx hexo thats the 2nd time u helped me :p


RE: Gaming Tutorial (how to walk) - Hexo - 06-20-2006

No problem.. now it works fine Wink (Goes looking for other tutorials)


RE: Gaming Tutorial (how to walk) - Ghettobird - 06-20-2006

hihi oki Smile

im making a few Smile


RE: Gaming Tutorial (how to walk) - DarkstaR - 06-23-2006

Erm, this maybe is a n00d question, but does these tuts wrok with Flash MX? 0=)


RE: Gaming Tutorial (how to walk) - Ghettobird - 06-23-2006

Yes, Since this has nothing to do with AS2(actionScripting2)

This will be Able on:
-Flash 8
-Flash mx 2005
-Flash mx 2004
-flash mx(7)
-flash 6
-flash 5


RE: Gaming Tutorial (how to walk) - DarkstaR - 06-23-2006

yay, then im gonna try it out soon =D