Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A thread 3

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 12 of 16«<1011121314>»
Forum Login
Message << Older Topic   Newer Topic >>
7/22/2007 16:22:40   
Umbrix
Member

Yeah. I can't say I really understand. Sorry :(

If you -could- find that, i'd appreciate it very much!
AQ  Post #: 276
7/23/2007 10:08:28   
Myhos
Member

quote:

ORIGINAL: flsg

OMG, someone posted?! Impossible lol
Myhos: if it stays with the pointer, how can it point to the direction of the pointer? I don't understand lol...

What i mean is that the object points toward the pointer and if you move your mouse then the pointer will still point in the the direction of mouse

ex:

(pointer be here)---> mouse be here



//Now i move the mouse up:



Mouse be here

(pointer be here) ^



< Message edited by Myhos -- 7/23/2007 10:09:02 >


_____________________________

AQ DF  Post #: 277
7/23/2007 17:24:43   
EragonZZZZ
Member

Thats less scripting and more trigonometry.
So it's going to be hard. Trust me, deriving trigonometric equations isn't fun...did it by accident once when I was trying to do rotation with VBA and PowerPoint. Had to keep a line the same length as I rotated it...by moving the endpoint around. Hell.
AQ  Post #: 278
7/24/2007 9:48:41   
flsg
Member

once I saw a method in the Math class that simplifies lots of things...just enter some x and y coordinations and it gives you the angle...forgot which...
I'm going to check it
AQ  Post #: 279
7/24/2007 10:50:25   
somebody621
Member

pfft
Math.atan2(mouse's x - pointer's x, mouse's y - pointer's y);
Convert that angle from radians into degrees, and there you go.
Post #: 280
7/24/2007 11:17:44   
flsg
Member

somebody621: yeah that's right! lol
and welcome back XD
AQ  Post #: 281
7/24/2007 16:18:50   
EragonZZZZ
Member

ohhh whoops.
I must've been thinking of something else.
Yeah, the only problem I had was figuring out how you did an inverse tan with flash lol.
AQ  Post #: 282
7/24/2007 16:34:12   
SirSchmoopy
Banned Multi


i need help with a lil' problem. i wanna make it so the thing i made rolls the random number, then subtracts it from the other thing, without me haing to right down every number frum 1-1000000000000000000000000000000234232456436142005349090783......and 4....
im kinda confused can u plz help me?


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 283
7/25/2007 10:36:52   
flsg
Member

SirSchmoopy: what? XD
I think you mean get a series of unique random numbers right?
create an empty array, each time you get a random number, check if there's already this number in the array, if not, put it in the array, else, re-generate another number
AQ  Post #: 284
7/25/2007 11:02:20   
dominic_r_monroe
Member

Is there anyone here who doesn't mind teaching me Althorne just has pure facts and i can't remember coding with him. The sto is full :(
AQ  Post #: 285
7/25/2007 11:09:29   
SirSchmoopy
Banned Multi


no, i mean, lets say theres the number 100. it rolls a number, lets say 2. then it subtracts the number 2 from it and makes it 98. however, i dont want to right a code where it says when the number is 2 or sumtin, minus 2 from 100, for every single number that exsists.

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 286
7/25/2007 11:36:04   
flsg
Member

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...
AQ  Post #: 287
7/25/2007 12:00:55   
Rain
Member

Plz help

I need to learn to draw in flash... I am a very good ActionScripter but I need some drawing tuts...

_____________________________

Post #: 288
7/25/2007 15:17:05   
Umbrix
Member

Anybody else have any ideas for Fire? I'd really appreciate it! :p
AQ  Post #: 289
7/25/2007 17:10:06   
flsg
Member

Rain: lol, I looked at your Java code(right?) in your gallery, I hope you're as good as in AS
like programming, drawing needs practice too, here:(I'm too lazy to find the good site, sorry)
http://www.google.ca/search?source=ig&hl=en&q=flash+drawing+tutorial&meta=
umbrix: I didn't find my fire, so here's another one:
http://as3.betaruce.com/tut/fire/fire_f8.html

< Message edited by flsg -- 7/25/2007 17:12:57 >
AQ  Post #: 290
7/25/2007 17:12:28   
SirSchmoopy
Banned Multi



quote:

ORIGINAL: flsg

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...

lets say there's a monster. above him is a dynamic text for his hp. when i generate the random number, it subtracts that number from his hp. but, i dont want to write for every number, a code saying minus this certain amount from the hp.

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 291
7/25/2007 17:13:44   
flsg
Member

SirSchmoopy: then why don't you just use monsterHp-=random(MaxNumber)?
AQ  Post #: 292
7/25/2007 17:35:31   
SirSchmoopy
Banned Multi


now ur confusing me! whts the maxnumber thingy? my brain hurts....

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 293
7/25/2007 18:12:22   
flsg
Member

just replace the number by the max number value+1
why don't you check the actionscript help documentation?
AQ  Post #: 294
7/26/2007 8:26:05   
Myhos
Member

quote:

ORIGINAL: SirSchmoopy

now ur confusing me! whts the maxnumber thingy? my brain hurts....


All right what he means is that you have a variable called monster HP

so you need to put in the key frame:

 var monsterHp = 100;
monsterHp -= random (99) +1;


now what the code says is "New Variable called monsterHp which is = to the value of 100. now - it by a random number between 0 and 99 and add the value of 1 to it"

Or even better would be:

 var monsterHp = random (99) +1 


< Message edited by Myhos -- 7/26/2007 8:28:23 >
AQ DF  Post #: 295
7/26/2007 15:37:17   
dominic_r_monroe
Member


quote:

ORIGINAL: flsg

dominic_r_monroe: what's a pure fact?
SirSchmoopy: wow, the question was far simpler than I thought...
why don't you just put the result in a textfield? Perhaps I still don't understand the question...



Althorne the way he teaches

(some kinda coding)
4t#dsdsffdsffsdfd
sdfsfdsfsfdfdawdfs
adfdfdsfdfsdsdff

(replace weird language with what it does it ussually has 3 or 4 lines)
AQ  Post #: 296
7/26/2007 15:56:36   
petermaxo
Member

I am working on an AQ style RPG and for monsters I just made one big movie clip with all of them in it and put the following code.

this.onEnterFrame = function(){
if(_global.ename == "mon1"){ //if the enemy's name is something...
this.gotoAndStop(1) //goto the frame of the movie clip with that monster on it.
}if(_global.ename == "mon2"){ //repeat
this.gotoAndStop(2)
}if(_global.ename == "mon3"){
this.gotoAndStop(3)
}...
}

when I have the movie clip in a scene, the movie goes back to the begining.
AQ DF  Post #: 297
7/26/2007 17:46:23   
flsg
Member

dominic_r_monroe: lol if Althorne sees this he'll never talk to you again lol
petermaxo: wow, I didn't understand the problem, but I know that you won't get far with this code(no offense)
first of all, what is the "this" you refers to? the code can't be on a movieclip, since you'll need to use "onClipEvent(enterFrame)"
which means that the "this" you're refering can't be the mc, so of course when you write this.gotoAndStop(frame), the movieclip doesn't do the action...

second, why would you want to use onEnterFrame? Isn't putting the mc to the right frame once enough? You're telling the mc to go to the desired frame each 1/12 seconds(or 1/24, depend on your FPS)

third, if you thought a little bit, this code will NEVER work. Imagine if AQ used your way. 600+ monsters means 600+ if()? No way.
AQ  Post #: 298
7/26/2007 19:12:33   
EragonZZZZ
Member

lol, flsg just tore yo method apart.
Just kidding. But yeah...no go, man, no go.

Instead...give each frame the name of the monster (say its "monster1")
Then, when the monster name is given, say gotoAndStop(monstername)
AQ  Post #: 299
7/27/2007 10:15:24   
SirSchmoopy
Banned Multi


quote:

ORIGINAL: flsg
why don't you check the actionscript help documentation?

wht AS help documentation?
also, why wuld i add 1 to it????? i just want it to subtrace the EXCACT number from his hp
http://img171.imageshack.us/my.php?image=scrollerew0.swf Im using it for the gun in this game i press a button, that does 2 things:
1. make a bullet animation.
2.generates a random number of how much damage it does.

< Message edited by SirSchmoopy -- 7/27/2007 10:23:38 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 300
Page:   <<   < prev  10 11 [12] 13 14   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 3
Page 12 of 16«<1011121314>»
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