Home  | Login  | Register  | Help  | Play 

RE: Flash Q&A thread 2 ** checked everyday

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 2 ** checked everyday
Page 5 of 24«<34567>»
Forum Login
Message << Older Topic   Newer Topic >>
3/19/2006 19:04:48   
flsg
Member

yeah I guess you're right
anyway, does someone know what does the "try{}" statement do in Java?
AQ  Post #: 101
3/19/2006 19:13:45   
lil boi blue
Member

nope, sorry, actually thats how i learned that system for fighting, im an uber visual learner so it is easier that way from viewing the actual thing than text
AQ DF  Post #: 102
3/19/2006 21:51:08   
somebody621
Member

flsg:For your question: Yes it should be possible. I've found a few articles on this kind of stuff: 1, 2 It's just that Java is one of the most common.
Post #: 103
3/20/2006 7:40:52   
flsg
Member

somebody621: what question?

< Message edited by flsg -- 3/20/2006 7:41:29 >


_____________________________

My flash gallery
my game thread

flsg, proud old member of AQ(still playing :O)
AQ  Post #: 104
3/20/2006 12:16:28   
Darklord517
Member

I am making a drag and drop game. How do i make it so that if a square i am dragging is placed directly into an empty square the movie plays frame 20?
AQ DF  Post #: 105
3/20/2006 14:16:14   
lil boi blue
Member

alright, i know this one

1)open a flash document
2)make a square and make it a movieclip named drag
3)select drag and go to the properties box and give it the instance name drag
4)in the actionscript box give it this code

quote:

onClipEvent (load) {
startX = this._x;
startY = this._y;
}
onClipEvent (mouseDown) {
if (_root.drag.hitTest(_root._xmouse, _root._ymouse)) {
_root.draggedDrag = true;
}
}
onClipEvent (enterFrame) {
if (_root.draggedDrag) {
_root.drag._x = _root._xmouse;
_root.drag._y = _root._ymouse;
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root.hit)) {
_root.draggedDrag = false;
_root.gotoAndPlay (45);
_root.drag._x = startX;
_root.drag._y = startY;
} else {
_root.drag._x = startX;
_root.drag._y = startY;
_root.draggedDrag = false;
}
}

the colors indicate what you can change red is the frame number to go to, the blue are the instances
5)make another box, make it a movie clip, and name it hit
6)give it the instance name hit

< Message edited by lil boi blue -- 3/20/2006 18:27:10 >
AQ DF  Post #: 106
3/20/2006 14:29:21   
The Illusive Man
Member

Lil Boi. I am making a shooter. I want to have a reload scene, but i am having problems

1) Can't get an ammo counter to work

2) A reload scene just playes every 30 frames or so



Next problem. In this "Shooter" I want to have a money field.

1) Whenever you shoot the guy i want it to give you say... $100

2) Whenever you lose health, you lose $50

3) I want to be able to spend it (ingame) but i do not want it to go below zero


Hope you can help. Have worked and worked, but none of my script/variables work!

Althorne
Post #: 107
3/20/2006 14:57:46   
lil boi blue
Member

that looks like a job for zoltan, he's made one before, maybe the other gurrus in AS can help too,
AQ DF  Post #: 108
3/20/2006 17:59:59   
flsg
Member

lil boi blue: are you sure to use hitTest?
because with movieclip, we can use _dropTarget
it's easier to use
AQ  Post #: 109
3/20/2006 18:05:38   
somebody621
Member

lil boi blue:try not to put as many onClipEvents, expecially onEnterFrame. Also, don't manipulate the x. Just use startDrag. When the mouse is up and the thing touching the thing you want to hit,do the drag and drop snap thing and set the x.
Althorne:Ammo counter:make a dynamic text box. Either give it a variable name as ammo, or set an instance name and put "ammocounter.text=ammo;"when you shoot. When you reload, just change the ammo to the default ammo.
For the money:make a object's money like char.money=500; and enemy1.money=500; or something like that.
Also make a function loseMoney like this:
function loseMoney(moneylost, currentmoney, attacker, shot){

Under that put this:
if(currentmoney>moneylost){
money -= moneylost;
attacker.money+=moneylost;
}else{
shot.money = 0;
attacker.money+=currentmoney;
}
}
 

When anybody gets shot, put this code:
//replace variables as needed
loseMoney(50, char.money, enemy1, char);

basicly, you just set up a user defined function. Thing of it as your new function as being like gotoAndStop, and (50, char.money, enemy1, char) as being the frame you want to go to. Buying stuff is similar to the code except you add the stuff to your inventory or something and there'd be no else. Hope this helps! I rarely give out actual code.
flsg:you posted the question somewhere.

< Message edited by somebody621 -- 3/20/2006 18:11:38 >
Post #: 110
3/20/2006 18:13:16   
flsg
Member

somebody621: lol, it's sometime useful to use a same name...
but I don't know, do you really think so?
because on the first page of the first tutorial, he used Java, it's hard to see the difference since AS 2.0 added try{}, catch{} and finally{} too

the second tutorial talks about Flash Remoting, and I'm not sure what it is(I already heard about this)
AQ  Post #: 111
3/20/2006 18:23:42   
lil boi blue
Member

do not question my authoratah! *whips flsg and somebody* back...back to your desks, learn more actionscript codes! lol jk, i dont know most of the stuff you guys talk about when it comes to AS, i just present it in an easy way, i have a knack when it comes to explaining or as people say, thats why i dont put a lot of stuff of the AS you guys post because i take it, if i get it, i'll post it up, pretend you're explaining things to kindergarteners so that its a step by step instruction (for all we know they could be here lol) but like when you say dont use hittests, in my mind i dont know what else there is, or for that matter ANY comments you make on my code i don't know what to change, i just see how i did it from unhosted games that i've made and copy/paste codes onto here saying "put onto drag"
AQ DF  Post #: 112
3/20/2006 18:33:11   
flsg
Member

lol sorry LLB, you're a better teacher than me, I don't explain enough
next time, I'll try to explain more
if I'm too lazy, then you could check in the AS help file in Flash:

open a Flash file, in any frame, open the AS window
type _droptarget
select it
use the dictionary button, then you'll see the _droptarget help's file
AQ  Post #: 113
3/20/2006 18:57:12   
lil boi blue
Member

i typically say this but please dont use , , , unless you mean it, if you did mean it i didn't necessarily say were a bad teacher, i just said that I felt that i was a good teacher so sorry if i offended you, im typically a jokey kind of guy (and everyone always has questions about AS anyways so lol...l...o...l)
AQ DF  Post #: 114
3/22/2006 3:21:47   
Darklord517
Member

Can someone help ive made this beginning to an RPG and now im trying to play a battle. When you get to the end of the scene with the shop and house at the end of the road should be a little wall. When you hit it you should be transported to scene 2 for the battle. Im not sure how to do that, please help.

The game is here:
http://img69.imageshack.us/my.php?image=rpg8ev.swf
AQ DF  Post #: 115
3/22/2006 17:39:33   
somebody621
Member

Woah. First things first. Get the page turning right.When you reach the end of a scene and go to the next one, your character should be next to the road on the other side, not already on the end of the road. Also, do not use music for demos. It takes too long to load.

Now for the actual thing. Do not actually use scenes unless the game is a ton of frames. Just use battle frames. If you really need scenes, use gotoAndStop(scene, frame);
Post #: 116
3/22/2006 18:47:32   
flsg
Member

I agree with somebody!!!
if you have over 100 maps, what will you do?(Almost every online RPG has more than 100 maps)
then you'll need 100 scenes lol
AQ  Post #: 117
3/23/2006 1:49:43   
Darklord517
Member

How would i make it so that the ball starts at the beginning of the road not at the end?
AQ DF  Post #: 118
3/23/2006 16:42:37   
flsg
Member

darklord: your code isn't very effective, but here's what you could do:
in the map where the player is at the end, put this on the _root:
player._x=number
player._y=number

player is the MC's name, and number is the number(lol)
if it's on a MC, just simply add a onClipEvent handler on this code
AQ  Post #: 119
3/23/2006 17:27:59   
somebody621
Member

I would just use a function to change maps(see the code a couple lines above)
Post #: 120
3/23/2006 17:44:53   
flsg
Member

hey guys, I just got a VERY weird battle system idea(only for 3v3):
why not put peoples in an Array?
set a variable, wichPlayer=0, we'll use it later.
use an loop to check if place(place is the position of the char,ex:the second of the left is 1(start with 0)) is empty. if it is, then do nothing, if it's not, then use Array.push() to put the player in an Array, PlayersPos.
during the battle, we check if the player has finished his attack, if it's true, then wichPlayer++(if wichPlayer<PlayerPos.lengh, else wichPlayer=0), and invoke: PlayerPos[wichPlayer].attack()
if the player die, then we'll delete it from PlayersPos(forgot how, but I'll find a way later)

what do you think?
the advantage of this is we don't need to check eveytime if a player die, or if a place is empty
other then that...I don't know lol

< Message edited by flsg -- 3/23/2006 17:45:56 >
AQ  Post #: 121
3/23/2006 19:27:47   
somebody621
Member

flsg:nice idea ; ) Also easy just and efficient doing battles.

I've started playing with my fire again. This time, however, it's a speed test to see how fast certain types of graphics are drawn in flash. I've also added wind. Here it is!
Looking at this, I don't think that bitmaps make a huge difference in flash drawing.

< Message edited by somebody621 -- 3/23/2006 19:29:59 >
Post #: 122
3/23/2006 19:35:45   
lil boi blue
Member

lol, sorry flsg but is there a way to make a 1,2,3,4,5, etc... learning tutorial for your AS, because i don't understand when i read it myself, i find it easier just to give the codes to people and then over time they learn what everything means instead of explain along the way, maybe at the end of the post just say for like
code: on(press){gotoAndPlay(2);}
code translation: under the condition of pressing this button, go to and run frame 2 but only under that condition
AQ DF  Post #: 123
3/23/2006 19:51:02   
flsg
Member

LBB: I don't understand what you mean...
what's 1,2,3,4,5... that you're talking about?
AQ  Post #: 124
3/23/2006 19:54:11   
somebody621
Member

He means something like this, I think:
1. show code and explain it
2. show code and explain it
etc.
Post #: 125
Page:   <<   < prev  3 4 [5] 6 7   next >   >>
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> RE: Flash Q&A thread 2 ** checked everyday
Page 5 of 24«<34567>»
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