Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A Thread 4

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A Thread 4
Page 8 of 30«<678910>»
Forum Login
Message << Older Topic   Newer Topic >>
9/6/2007 19:08:55   
EragonZZZZ
Member

X_X
wow.

Wait, 3rd level? I assume 2nd level is Assembly language and 1st level is machine code.
And yeah, I'm working on C++ too.
AQ  Post #: 176
9/6/2007 19:36:34   
flsg
Member

yeah
BTW, I suggest you to concentrate on one program language instead of learning 2 or 3 at the same time

_____________________________

My flash gallery
my game thread

flsg, proud old member of AQ(still playing :O)
AQ  Post #: 177
9/6/2007 20:04:02   
SirSchmoopy
Banned Multi


this will probably be last post, ill c ya in 2009, but as a last post, i edited my demon dood, so c ya http://img204.imageshack.us/my.php?image=giftageuc7.swf

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 178
9/7/2007 17:21:40   
EragonZZZZ
Member


quote:

ORIGINAL: flsg

yeah
BTW, I suggest you to concentrate on one program language instead of learning 2 or 3 at the same time


I'm concentrating on Java, C++ was just a look into what I may take up in the far future.
It's not going to cause me too much trouble to multi task like that.
AQ  Post #: 179
9/8/2007 21:22:49   
SeniorBiscuitBut
Banned Multi


how do i make a health bar thing where there are three hearts, and when the char gets hit, he loses a heart?
AQ  Post #: 180
9/8/2007 21:28:22   
Shad0wdrag0n
Member
 

I have a couple AS2 questions. I'm working on an rpg style inventory, just to see if I can figure it out (and maybe add it to an rpg game later on). I've figured out how to get it so an item is added to an inventory MC when the player picks up the item (I'm using using attachMovie to add the item MC to the inventiory MC). What I can't figure out is how to make the item appear in the first empty "slot" in the inventory. So, if the first and second slots have items in them the new item will be added to the third slot, or if the first and third slots have items in them then the new item will be added to the second slot. I also need something where if all the slots have items in them the new item can't be picked up.

I'd also like to make it so items can be moved around within the inventory, so the player can organise the items in the inventory however he/she wants. I know how to make an item that can be picked up and dropped onto a set location, but I don't know how to make it so an item can be picked up and dropped onto any one of several locations.

Any help I can get would be greatly appreciated. I've been searching the internet for tutorials that might help, but so far I haven't found anything.
Post #: 181
9/8/2007 21:31:48   
SeniorBiscuitBut
Banned Multi


all u need to do is make a picture of the item ur moving inside a seperate frame in the inv slot, make the item draggable, then make it so when it touches the slot, it unloades the item and goes to the frame in the slot of the item in there, then when u click it, make it a button that recreates the object :)
AQ  Post #: 182
9/9/2007 11:48:38   
EragonZZZZ
Member

woah, a series of posts neither flsg, i, somebody, or althorne was involved in. >_>
Not certain if that's the best solution, but then again I do inventories in a different way ^_^
AQ  Post #: 183
9/9/2007 13:22:22   
SeniorBiscuitBut
Banned Multi



quote:

ORIGINAL: SeniorBiscuitBut

how do i make a health bar thing where there are three hearts, and when the char gets hit, he loses a heart?

Once again, how do i make that?
AQ  Post #: 184
9/9/2007 13:47:21   
The Illusive Man
Member

er... there is a way that may work

make a Movieclip - Put 3 hearts in the first one. Put 2 hearts in the second one. Put 1 heart in the third frame. And Put 0 hearts in the fourth. Give each of the frames a name.

Create a variable in the main timeline called health or something to that effect.

Use the following code (modify it a little bit to call it your own lol)

if(_root.healthorsomethingtothateffect=='3'){_root.healthbar.gotoAndStop("3hearts");}
if(_root.healthorsomethingtothateffect=='2'){_root.healthbar.gotoAndStop("2hearts");}
if(_root.healthorsomethingtothateffect=='1'){_root.healthbar.gotoAndStop("1hearts");}
if(_root.healthorsomethingtothateffect=='0'){_root.gotoAndStop("DAI!!!");}

There's probably an easier way to do that. But i dunno if "elseif" works in flash lol. I've been spending too long on php lol.
Post #: 185
9/9/2007 15:35:33   
EragonZZZZ
Member

if(condition)
{
//code here
}else if(condition)
{
//more code here
}
AQ  Post #: 186
9/9/2007 15:48:01   
flsg
Member

hey new people!!! :) welcome
for the inventory system, I work in a totally different way. But you COULD just use SeniorBiscuitBut's way if your game is small*
althorne: your method is easy for 3 hearts, bu what if you have 180 hearts? then you'll need to use 180 MCs >_<
I suggest to use a for loop and attach the heart MC, then re-attach the right number each time(so you won't need to assign an instance variable, and remove the copy heart according to the instance name)
//somewhere...
var heartsNumber:Number=12
function loseLife(num:Number):void{
for(var i:Number=0;i<num;i++){
_root.attachMovie("yourHeartLinkageName", "newName"+i,i)
}
}
//somewhere, when you lose a life
heartsNumber--
loseLife(heartsNumber)

this uses to fact that you override the previous hearts by re-attaching sometime to the same depth(AS2)
if this doesn't work(don't have time to test myself right now, sorry), tell me and I'll re-write a code

* I didn't read SeniorBiscuitBut's solution, but that should work lol XD
AQ  Post #: 187
9/9/2007 15:48:32   
The Illusive Man
Member

Aaah, i didn't know if elseif existed outside php :)
Post #: 188
9/9/2007 16:50:00   
SeniorBiscuitBut
Banned Multi


thanks althorne, but now all i need to know is, how do i get it to subtract frum the health
AQ  Post #: 189
9/11/2007 19:27:35   
SirSchmoopy
Banned Multi


Duz any1 tthink i shuld make a galery?
btw im bak cuz i realized how much i sux, even tho i know i sux i didnt know how much

< Message edited by SirSchmoopy -- 9/11/2007 19:29:37 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 190
9/12/2007 18:02:28   
SirSchmoopy
Banned Multi


Helloooo??? any1 there? aww, every1 h8s me, when i cum back, u stop comin here, and when im gone, ur always on this Q&a

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 191
9/12/2007 18:20:21   
The Illusive Man
Member

It's not up to us whether you should make a gallery. It's yours. If you want advice and stuff, make one. If you don't want it, then don't. Simple as that.

_____________________________

Post #: 192
9/13/2007 16:35:19   
EragonZZZZ
Member

No, SirSchmoopy, we don't hate you. That's silly.

Your post just had nothing at all to do with the thread whatsoever, nor did it really benefit anyone else, so naturally nobody responded. This thread becomes active when needed.
AQ  Post #: 193
9/13/2007 19:24:15   
Trip
Member

Some People Might Say Your Good Some Low Lifes Would Say No
THe People That Say No Are Shelfish :P
Post #: 194
9/14/2007 23:03:33   
EragonZZZZ
Member

Just thought I'd poke some life into this by asking the question:

When you are creating a series of classes that need to use the same constants, such as stage width/height, what do you do to ensure that you can easily change said constants without editing each file?

Personally, I define a class called 'constants' and declare it in my base classes (the two or three that every other object is a child of), name it something simple like 'c', and refer to constants as 'c.STAGE_WIDTH' or 'c.STAGE_HEIGHT'.

This way, all you ever need to to change your 'global' constants is change the Constants class file. :D
AQ  Post #: 195
9/15/2007 10:00:03   
flsg
Member

yeah that's the way I think. I use it like that too
since in AS3 you can't access the stage in every class, but only the main document class
wait, you're talking about AS3, right? XD
AQ  Post #: 196
9/15/2007 10:25:10   
EragonZZZZ
Member

Nope, AS2, but I'll be using it in AS3 too.

So wait, AS3 got rid of using _root in your classes (other than the main)?
Interesting. That means all of those functions are going to have to be sent to the main document.

I reallly need to buy CS3 so I can work on AS3.
It allows for AS2 access also, right? So I can keep programming while still learning?
AQ  Post #: 197
9/15/2007 11:24:21   
flsg
Member

no, in AS3, the root refers to the CLASS, so the main document class is the movie, so the root in the main class in the swf file
AQ  Post #: 198
9/15/2007 15:48:06   
EragonZZZZ
Member

Ohh, that's so much cleaner and nicer and OOP-esque.

DUDE! I've got something amazing to show you that'll encourage you on your AS3 learning:

Flash 3D Demo

That's Flash right there. Flash. Handling 3DsMax models. No..freaking...way.
AQ  Post #: 199
9/15/2007 20:59:56   
flsg
Member

lol...saw this thing twice XD
I even PMed this to somebody621(sorry didnt PM this to you because you didn't use AS3)
AQ  Post #: 200
Page:   <<   < prev  6 7 [8] 9 10   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A Thread 4
Page 8 of 30«<678910>»
Jump to:



Advertisement




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