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 5 of 16«<34567>»
Forum Login
Message << Older Topic   Newer Topic >>
3/29/2007 21:41:06   
flsg
Member

petermaxo: i didn't completly understand your question, but I think that's you should remove the first onEnterFrame, since every time a frame passes it redefine the variable action. If you change it in a frame, the next second it will re-become hit
AQ  Post #: 101
3/30/2007 16:16:30   
petermaxo
Member

Okay, let me explain it better. I told it to attatch the movie "playerhit" whenever the variable _global.action = "hit". on 1 frame in the movie clip "greenslimeattack", which is attached earlier, the variable _global.action = hit. when I run the movie, _global.variable != hit, no matter how many times the frame in the movie clip goes by.
AQ DF  Post #: 102
4/5/2007 15:52:21   
petermaxo
Member

quote:

Okay, let me explain it better. I told it to attatch the movie "playerhit" whenever the variable _global.action = "hit". on 1 frame in the movie clip "greenslimeattack", which is attached earlier, the variable _global.action = hit. when I run the movie, _global.variable != hit, no matter how many times the frame in the movie clip goes by.


some more clarification, the total script is:

on the scene:

if(_global.back == 1){
_root.attachMovie("grassback", "back", 1,{_x:335,_y:300})
}if(_global.back == 2){
_root.attachMovie("labback1", "back", 1,{_x:335,_y:300})
}if(_global.back == 3){
_root.attachMovie("labback2", "back", 1,{_x:335,_y:300})
}if(_global.back == 4){
_root.attachMovie("riverback", "back", 1,{_x:335,_y:300}) // determines the background
}if(_global.ename == "green slime"){
_root.attachMovie("greenslimeattack", "enemy", 3,{_x:400,_y:300})// determines the enemy
}_root.enemy.play()// plays the enemy movie
_root.onEnterFrame = function(){
if(_global.action == "hit"){
_root.attachMovie("playerhit", "player", 2, {_x:200,_y:300})// attatches the movie "playerhit" if action = "hit"
}if(_global.action == "attackcomplete"){
gotoAndStop("battle")
}
}




on the movie clip "greenslimeattack" frame 6:

_global.action = "hit"



Edit: is it just me, or have things been a little quiet around here?

I have another problem. what code should I use to set the global variable eaction to "attack" when the movie clip enemy is within 50 pixils of the movie clip player?

< Message edited by petermaxo -- 4/9/2007 20:48:07 >
AQ DF  Post #: 103
4/11/2007 15:58:15   
Myhos
Member

Eh sorry I'm busy doing other things, I honestly can't understand what your trying to do so sorry :( anyhow I'm working o something else having to do with flash, if i'll need help i'll post here~myhos signing off(for now)
AQ DF  Post #: 104
4/15/2007 10:07:49   
petermaxo
Member

okay, I figured out what was wrong with my earlier script, but ran into ANOTHER problem. how does one destroy a movie clip attatched to the root?
AQ DF  Post #: 105
4/17/2007 17:29:35   
flsg
Member

petermaxo: check the help document
it's _root.removeMovieClip(clipName)
AQ  Post #: 106
4/17/2007 18:45:35   
petermaxo
Member

it doesn't work

< Message edited by petermaxo -- 4/17/2007 18:49:18 >
AQ DF  Post #: 107
4/18/2007 17:03:03   
flsg
Member

well it should
AQ  Post #: 108
4/19/2007 15:36:09   
petermaxo
Member

Grr... I just realized it was that pesky _root.onEnterFrame again!
good news is, Problem solved (finally)

and in case anyone's wondering, I am working on something big. I may tell you about it when I am done.

< Message edited by petermaxo -- 4/19/2007 15:37:46 >
AQ DF  Post #: 109
4/19/2007 16:30:40   
SirSchmoopy
Banned Multi


How do i put the thing i make on a piczo page??

< Message edited by SirSchmoopy -- 4/19/2007 16:32:12 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 110
4/20/2007 7:14:18   
SirSchmoopy
Banned Multi


Also, how would i make a character fight a monster? it's kinda hard, especially since i dont know how to program these scripty things....
Edit: ty so much for all the stuff it really helps!!!

< Message edited by SirSchmoopy -- 4/20/2007 7:15:36 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 111
4/20/2007 16:27:30   
flsg
Member

SirSchmoopy: wow, your question is waaaaaaay too large...if you don't know flash AS and want to create a RPG, then use RPGMXP, it's easier and gives you many templates. Or you could learn flash AS
AQ  Post #: 112
4/20/2007 18:31:12   
SirSchmoopy
Banned Multi


no offence flsg, but flsg doesnt work becuz all it is it a bunch of writing and talking and its confusing and i dont kno wht they're doing and why they dont just get me sumtin to make a game (rpg)......i only have 29 days to make it.......

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 113
4/20/2007 23:45:44   
somebody621
Member

If you can't understand RMXP, than an rpg in flash IS WAY TOO MUCH. In fact, for MOST people, an rpg is way too much. If you're too lazy to understand RMXP, I'm sorry, you can't learn flash. No offence or anything...
Post #: 114
4/21/2007 12:16:09   
flsg
Member

hey somebody, you're back!!!(where you gone? lol)
and yes SirSchmoopy, somebody is right. BTW, I don't like RPGMXP
AQ  Post #: 115
4/21/2007 15:33:40   
EragonZZZZ
Member

No offense, I absolutely hate all the game maker programs that basically do the work for you.

I hate even more those "Free sprite sheets" sites that allow you to basically create sprites that look awesome with other people's art. Blech.


And, dude, there's a ton you could do with the free trial. Just don't start with an RPG; start with like a simple space shooter.


(lol, i knew i said i was leaving the forums, but this i felt required a comment)
AQ  Post #: 116
4/22/2007 20:23:28   
SirSchmoopy
Banned Multi


Yay! i bought one ofthe books some1 recomended and now im getting used to flash, but still, can some1 tell em whts wrong with this thing for my button:
theButton.onRelease = function(){
trace("Ouch! !");
}

< Message edited by SirSchmoopy -- 4/23/2007 7:25:43 >


_____________________________

Sig deleted.
Post sig only once per page.
Post #: 117
4/23/2007 20:10:21   
flsg
Member

SirSchmoopy: which book are you talking about?
and there's nothing wrong in the code, but do you have a button of the same name?
but I'm not sure you can used to flash in 1 week, it took me 2 years...
AQ  Post #: 118
4/25/2007 19:07:06   
SirSchmoopy
Banned Multi



quote:

ORIGINAL: flsg

SirSchmoopy: which book are you talking about?
and there's nothing wrong in the code, but do you have a button of the same name?
but I'm not sure you can used to flash in 1 week, it took me 2 years...

o, then i must be doing sumtin wrong cuz its the same name as the button i made yet it still doesnt work. also i didnt learn EVERYTHING about it, i just kno a bit

_____________________________

Sig deleted.
Post sig only once per page.
Post #: 119
4/26/2007 17:03:03   
flsg
Member

ok, let me see that:
where is the code? is it on the same depth(on _root, a movieclip, etc) as the button?
AQ  Post #: 120
4/26/2007 18:55:46   
petermaxo
Member

Code:

_root.onEnterFrame = function(){
trace(action)
if(_global.action == "hit"){
if(_global.condition == "ready"){
_root.player.removeMovieClip()
_root.attachMovie("playerhit", "player", 2, {_x:200,_y:300})
_root.player.play()
_global.condition = "wait"
}
}trace(action)
}

Problem: nothing happens. it doesn't even trace the variable. No error message appears when I check it.
AQ DF  Post #: 121
4/27/2007 15:59:38   
flsg
Member

don't tell me it's another onEnterFrame error...XD(I told you to not abuse them lol)
is the variable action defined? if it is, where is it? on _root? or somewhere else?
AQ  Post #: 122
4/27/2007 17:02:07   
petermaxo
Member

no it is not another one of those. all variables are defined, and even if they weren't it would still trace 'undefined'.
AQ DF  Post #: 123
4/30/2007 17:20:51   
flsg
Member

where did you put the code? perhaps on a frame that doesn't even play
AQ  Post #: 124
5/2/2007 17:14:39   
petermaxo
Member

they are defined in the first scene.the problems are in the 15th.

< Message edited by petermaxo -- 5/2/2007 17:15:41 >
AQ DF  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 3
Page 5 of 16«<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