Home  | Login  | Register  | Help  | Play 

RE: Flash help and tutorials, come here to share your wisdom or ask questions

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash help and tutorials, come here to share your wisdom or ask questions
Page 9 of 24«<7891011>»
Forum Login
Message << Older Topic   Newer Topic >>
10/16/2005 4:30:37   
Zoltan
Member

aahh the dullness that is this flash tutorial thread..... so i decided to tutor you all in the art of invetory...

RPG Inventory

This tutorial covers making item slots for a walkaround RPG.

1) Add this script to your first frame (you only need to put everything on one layer)
--->

currentslotnum = 1;
stop ();
function addToslot (item) {
if (!item.found) {
item._x = eval ("itemSlot" + currentslotnum)._x;
item._y = eval ("itemSlot" + currentslotnum)._y;
item.found = true;
currentslotnum++;
}
}


2) On the stage draw what you want to be the items that can be picked up, make them movie clips and give them the following script
---->

onClipEvent (enterFrame) {
if (_root.character.hitTest (this)) {
_root.addToslot (this);
}
}


(character = The name of your character, so it can be changed depending on what you call it)

3) Draw what you want to be your character, make it a movie clip and give it the following script. Also name it in the propertey inspecter "character" ,without speech marks of corse.
---->
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}


(This is a very very basic script but you can change the speed by altering the number in red)

4) Now draw your item 'holders' ,they could be rectangles (with no fills works best) and make them movie clips. If you hade 1 item that could be picked up only make one box but if you have two items that could be picked up make two boxes and so forth.. Now give the box(s) the names itemSlot1 changing the number for every box eg: itemSlot1, itemSlot2 ---> Dont forget to right itemSlot like this ---> itemSlot

5)And now your done!

EXTRA---> Arrow keys to move and 'walk over' items to 'collect' (if you pick up 'axe' first it will go into item slot 1 but if you pick up 'sword' first it will go into item slot 1, there are no set slots for items)

EG= http://haze.voodoolabs.net/inventory.swf


< Message edited by Zoltan -- 10/16/2005 4:36:43 >
Post #: 201
10/28/2005 6:59:43   
gargantua
Member

hi. Ummm........how do you rotate objects? i need to know plz.

_____________________________

*munch* A 100px high image leaves no room for text.
AQ DF  Post #: 202
10/29/2005 20:31:19   
lil boi blue
Member

ok, sorry for not coming on for a long time, i was just taking a break from AQ lol,

ok rotating objects...there are two was the actionscript way and my way
actionscript way:
1)(insert Zoltans crazy actionscript knowledge here)

My Way
1)open flash document
2)select and holddown on rectangle button so droplist comes down
3)select polystar
4)go to properties at the very bottom of the screen and select options and make it a star
5)make a star on the screen now with a fill besides black/white
6)make the star a movie clip
7)on the only frame, motion tween it and left click it; go to properties tab
8)there should be two rows and three columns, if just one double click on middle space in properties tab
9)on middle column make tween "Motion" and change rotation to CW and check the box "orient to path"
10)press 'q' (freetransform tool) on your keyboard and make the vertex of the star in the very center of it
11) make a motion guide for this star by going to the timeline and pressing the "+'''." looking button
12) select circle tool and hold down shift while making it very smal in the center of the star
FIN) i think i covered it all, try it out, i know your working on a game so i told you the "one frame" trick of mine (most people would make the guide go to like frame 12 or something, im special :) )

< Message edited by lil boi blue -- 10/29/2005 20:39:42 >
AQ DF  Post #: 203
10/29/2005 21:15:00   
Valgaera
Member

Wow Zolatan. That is some seriosu coding. Did you write that?
Also, is there a way you get get the item from the inventory to your hand?
AQ  Post #: 204
10/29/2005 21:24:53   
lil boi blue
Member

i find some at http://www.actionscripts.org/tutorials.shtml

i just dont know which i want to use
AQ DF  Post #: 205
10/30/2005 0:36:44   
Zoltan
Member

auctually i have a book on flash and i find different scripts then i see how they could be applied to games and put them all together, its basicly trial and error, and some i get from other people and just write them the best i can so you all can read them


and gargantua just incase you mean rotate a drawn image, you use the freeform too, whats that you might ask, its the tool in the tool bar that is selected http://i5.photobucket.com/albums/y158/photo12/cursor1.jpg

also Lil boi blue, ive done a whole lot more than just 2 tutorials, but you have only 2 of mine on the front post, are you trying to make me look bad???
Post #: 206
10/30/2005 13:15:29   
lil boi blue
Member

lol, actually honostly im making a banner for this thread with you and me on it, no, i just haven't figured a catagory for it, i'll make it Actionscript with Zoltan, ugh, now i have to work by reading past posts, you see what you do to me zoltan... lol ^_^

ok phew, done, i put it on

< Message edited by lil boi blue -- 10/30/2005 13:28:42 >
AQ DF  Post #: 207
10/30/2005 14:44:04   
bloodvenom
Member

quote:

ORIGINAL: Zoltan

aahh the dullness that is this flash tutorial thread..... so i decided to tutor you all in the art of invetory...

RPG Inventory

This tutorial covers making item slots for a walkaround RPG.

1) Add this script to your first frame (you only need to put everything on one layer)


--->

currentslotnum = 1;
stop ();
function addToslot (item) {
if (!item.found) {
item._x = eval ("itemSlot" + currentslotnum)._x;
item._y = eval ("itemSlot" + currentslotnum)._y;
item.found = true;
currentslotnum++;
}
}


2) On the stage draw what you want to be the items that can be picked up, make them movie clips and give them the following script
---->

onClipEvent (enterFrame) {
if (_root.character.hitTest (this)) {
_root.addToslot (this);
}
}


(character = The name of your character, so it can be changed depending on what you call it)

3) Draw what you want to be your character, make it a movie clip and give it the following script. Also name it in the propertey inspecter "character" ,without speech marks of corse.
---->
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}


(This is a very very basic script but you can change the speed by altering the number in red)

4) Now draw your item 'holders' ,they could be rectangles (with no fills works best) and make them movie clips. If you hade 1 item that could be picked up only make one box but if you have two items that could be picked up make two boxes and so forth.. Now give the box(s) the names itemSlot1 changing the number for every box eg: itemSlot1, itemSlot2 ---> Dont forget to right itemSlot like this ---> itemSlot

5)And now your done!

EXTRA---> Arrow keys to move and 'walk over' items to 'collect' (if you pick up 'axe' first it will go into item slot 1 but if you pick up 'sword' first it will go into item slot 1, there are no set slots for items)

EG= http://haze.voodoolabs.net/inventory.swf



it doesn't work.
AQ  Post #: 208
10/30/2005 17:40:50   
lil boi blue
Member

nope, it workslike a charm, you must have done something wrong, i'll change it a bit my changes are in blue

__________________________________________________________

RPG Inventory

This tutorial covers making item slots for a walkaround RPG.

1) left click on the first frame and Add this script to it (open up actionscript tab at bottom of screen)


--->

currentslotnum = 1;
stop ();
function addToslot (item) {
if (!item.found) {
item._x = eval ("itemSlot" + currentslotnum)._x;
item._y = eval ("itemSlot" + currentslotnum)._y;
item.found = true;
currentslotnum++;
}
}

2) On the stage draw two items that you want to be the items that can be picked up, make them movie clips and give them the following script
---->

onClipEvent (enterFrame) {
if (_root.character.hitTest (this)) {
_root.addToslot (this);
}
}

(character = The name of your character, so it can be changed depending on what you call it)

3) Draw what you want to be your character, make it a movie clip with the name character and give it the following script. Also in properties tab on bottom in the instance box, name your character........'character' nothing else. then give your character this actionscript

---->
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}

(This is a very very basic script but you can change the speed by altering the number in red)

4) Now draw your item 'holders' ,they could be rectangles (with no fills works best) and make them movie clips. If you hade 1 item that could be picked up only make one box but if you have two items that could be picked up make two boxes and so forth.. Now give the box(s) the names itemSlot1 changing the number for every box eg: itemSlot1, itemSlot2 ---> Dont forget to right itemSlot like this ---> itemSlot

5)And now your done!

EXTRA---> Arrow keys to move and 'walk over' items to 'collect' (if you pick up 'axe' first it will go into item slot 1 but if you pick up 'sword' first it will go into item slot 1, there are no set slots for items)

EG= http://haze.voodoolabs.net/inventory.swf


< Message edited by lil boi blue -- 10/30/2005 17:41:41 >
AQ DF  Post #: 209
10/30/2005 22:16:22   
Zoltan
Member

its pretty obvious that it dose work because there is an example at the bottom, anyway sometimes lil boi blue has to explain things more detalied, because sometimes i use the correct termanoligy and knowone knows what the heack im saying
Post #: 210
10/31/2005 21:18:58   
lil boi blue
Member

actually zoltan I have a question for you, what is the meaning of living?....... lol j/k how do you make it so that in a walk around when you stop pressing buttons the guy's legs will stop moving but when you press they do, i know only an art trick which is for movie clips you double click them and you can give them automated instructions like move legs in one frame or something like that
AQ DF  Post #: 211
11/1/2005 22:43:15   
Zoltan
Member

well the hitchikers guide to the galaxy told me that the meaning of life was 42 it that helps, also im going to start up a couple of tutorials on hittests, these are the very backbone of making a good flash game. so aspiring flash game makers can look forward to that.
Post #: 212
11/1/2005 23:49:05   
lil boi blue
Member

lol, i was making an addition to archknight, but shhhh, dont tell people i've been working on it since the begining of august.......
or last saturday lol...........or just thinking about it since last saturday


< Message edited by lil boi blue -- 11/1/2005 23:51:03 >
AQ DF  Post #: 213
11/3/2005 3:42:39   
Zoltan
Member

Ahh the gloriousnessnessness that is hit tests, if used in the right context these can be wonderous peices of coding, but for now lets keep it basic.

Using a Hit Test to 'goto' Another Keyframe

1) In flash draw a image that you want to be your character and convert it to a MC (movie clip)

2) Name the character guy for now in the properties inspector and give it this script---->

onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}

3) Create the object that when it is hit by the 'guy' goes to another keyframe make it a MC and give it this script---->

onClipEvent (enterFrame) {
if (_parent.guy.hitTest (this)) {
_parent.gotoAndStop("inn");
}
}

Firstly the writing it the blue 'guy' can be changed to be the name of the movie clip that is going to hit it.

The red text 'inn' can be changed depending on the name of the keyframe that you want to goto when the hit hapens

The gotoAndStop can be changed to gotoAndPlay depending if you want it to stop on that keyframe or continue playing

Now there are heaps of changes that can be made but im just pointing out the basic ones, so if your a smartass and you decide to point another out i will kill you ... yes this is a writen threat.

4) Now create another keyframe along the timeline and call it inn then on the first keyframe add the script stop(); to stop the movie from playing onto the next frames.

it should work a little like this http://haze.voodoolabs.net/movemenu.swf

well i hope it works lil boi blue fell free to jazz this up a little.

Forgot to mention that the RPG tutorial that i posted above a little is also basic hittests, yeah


< Message edited by Zoltan -- 11/3/2005 3:44:49 >
Post #: 214
11/3/2005 19:17:01   
lil boi blue
Member

lol, ever since last video, i've really upped my flash drawing, (upgraded from the pencil to......THE PEN!!!!! i love the pen for getting those percise measurements and such, i'll be posting some drawing techniques soon w00t w00t, because it is evident that i am not at all knowledgable of actionscript, i tried making my own once and it almost worked but i failed miserably so i'll tut on what i do best lol
AQ DF  Post #: 215
11/8/2005 13:03:10   
The Patriot
Member

ok loki! tell me how to use motion tween to move arms and legs of a charecter. i try todo that but i end up doing stuff wrong and it cuts a part of the person, and i tried frame by frame, uber failure...how do i move arms and legs of a charecter i created?
AQ  Post #: 216
11/9/2005 1:05:20   
lil boi blue
Member

SJW8800!! you were unbanned..........for the THIRD TIME lol.

um you have flash mx right? did you follow this, there's even a video on it

quote:

how and what is motion tween?
VIDEO OF MOTION TWEEN:
Motion tween is a mechanism that allows you to not draw each frame over and over again but let the computer do the work

1)open a flash document
2) make a circle in the right hand corner
3)in the time line, right click the grey keyframe and select 'create motion tween' (the first option)
4) right click on frame 15, and select 'insert keyframe'
5)left click on key frame 15
6)press 'q' on your keyboard to select freetransform tool
7)circle should be highlighted
8) move circle to top left hand corner
FIN)press 'enter' and watch the circle move

hint)you can use this same technique on multiple layers


< Message edited by lil boi blue -- 11/9/2005 1:06:07 >
AQ DF  Post #: 217
11/10/2005 0:37:25   
The Patriot
Member

yes , i dont think that the mods will deal with me for a fourth time =P but back to my post.

yes i saw that and i praticed that a bit. but i tried to move 2 joints of an arm but it highlighted both parts of the arm. i want to know how to indivisually move 2 diferent parts of the arm. if i have to use 2 tweens or something like that? how do i do that?
AQ  Post #: 218
11/10/2005 1:34:07   
lil boi blue
Member

ok, here is the number 1 rule about motion tween, it....is....impossible to have two motion tweens going in different directions in one frame

ok i'll tell you how to make a CIRCLE with two SQUARES moving for arms

1)open flash document

2)make a circle

3)select the WHOLE circle (right click it) and convert it to a movie clip, name it body

4)MAKE A NEW LAYER, now make a recatangle on the right side of the CIRCLE (in the new layer)

5) make that rectangle a movie clip and name it right

6)MAKE A NEW LAYER and make a rectangle on the left side of the circle

7)make the rectangle a movie clip and name it left

8) on the RIGHT rectangle take the VERTEX(white dot) and make it inside the circle AND square

9) do the same to the LEFT rectangle (take the VERTEX(white dot) and make it inside the circle AND square)

10)now follow the steps to motion tween but do it to the TWO rectangles and ONE square
AQ DF  Post #: 219
11/10/2005 10:42:19   
The Patriot
Member

hell yeah! thats what im talkin about! you rule flash loki!
AQ  Post #: 220
11/10/2005 19:27:49   
lil boi blue
Member

*does a jig cause it worked for sjw* i've conquered explaining to what was said the unconquerable...................................meaning i can teach you too *gasp*you didn't think i was refering to you when i said unconquerable did you?! lol j/k

(i used to tutor 1st and 2nd graders so when i explain something i pretend they are in that grade)

like me new avy?

< Message edited by lil boi blue -- 11/10/2005 19:28:14 >
AQ DF  Post #: 221
11/11/2005 18:51:15   
Zoltan
Member

Your avatar is well... different anyway i thought i would add in a little bit of basic script, which i havnt done for a while

How to Make a MC Invisible in your Movie but not on the Stage


Its so simple it doesnt even need numberes just add this script to the MC!

onClipEvent (load) {
_alpha = 0;
}

SIMPLE!
Post #: 222
11/12/2005 14:11:35   
lil boi blue
Member

hey zoltan, i need an actionscript on how to make a guy move when you press the arrow keys. (im making a pacman thing)

so that when im not pressing anything, the guy is still, but when i press arrows, he makes movements with his mouth(up and down)

you dont have to make it like im first grader, im a big boy, i understand most terms (instance names, MC, etc...)
AQ DF  Post #: 223
11/13/2005 2:55:55   
Zoltan
Member

There is one on the front page
Post #: 224
11/13/2005 11:34:03   
lil boi blue
Member

i mean like in your orilinth game, how when you press your arrow keys, his legs move with the whole actionscript itsself, lol, i know there is the actionscript that i put on the front page myself with the movement on arrows lol^_^

O...........O...O...O
|......->...|....|....|
||........../\....|.../\

< Message edited by lil boi blue -- 11/13/2005 11:43:58 >
AQ DF  Post #: 225
Page:   <<   < prev  7 8 [9] 10 11   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash help and tutorials, come here to share your wisdom or ask questions
Page 9 of 24«<7891011>»
Jump to:






Icon Legend
New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Content Copyright © 2018 Artix Entertainment, LLC.

"AdventureQuest", "DragonFable", "MechQuest", "EpicDuel", "BattleOn.com", "AdventureQuest Worlds", "Artix Entertainment"
and all game character names are either trademarks or registered trademarks of Artix Entertainment, LLC. All rights are reserved.
PRIVACY POLICY


Forum Software © ASPPlayground.NET Advanced Edition