Remove Ads

Share on Facebook Share on Twitter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gaming Tutorial (how to walk)
#1
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)



Reply
#2
Nice tut Roch ;D, but i dont wanna dl Flash 8 just to test it =\
Reply
#3
thnx Smile

its also compatible with Flash mx and Flash 2004
Reply
#4
Nice, just one problem.. when I press right it goes up :o
Reply
#5
oh whoops forgot to change the y in x srry :$ (fixed now) thnx hexo thats the 2nd time u helped me :p
Reply
#6
No problem.. now it works fine Wink (Goes looking for other tutorials)
Reply
#7
hihi oki Smile

im making a few Smile
Reply
#8
Erm, this maybe is a n00d question, but does these tuts wrok with Flash MX? 0=)
Reply
#9
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
Reply
#10
yay, then im gonna try it out soon =D
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gaming Tutorial (How to Make Movable Items) Ghettobird 0 753 06-22-2006, 01:54 AM
Last Post: Ghettobird
  Gaming Tutorial (how to make Walls) Ghettobird 2 702 06-21-2006, 06:58 AM
Last Post: Ghettobird
  Basic tutorial [make a button] Ghettobird 0 496 06-20-2006, 05:00 AM
Last Post: Ghettobird

Forum Jump:


Users browsing this thread: 1 Guest(s)