Flash Game Maker: DOWNLOADSetupQ:How do I add this to flash?
A:Few steps
a-download and unzip
b-open flash preferences
c-From Category, choose ActionScript and click "Action Script 2.0 settings"
d-Browse and choose the unzipped folder "myas2ext".
Q:I want to do a test that I correctly set it up
A:Try this
a-Make new flash file (As2)
b-Create a rectangle, select it and press F8
c-Tick [Export for ActionScript]
d-In the Class field, write guzu.game1.Room
If you get no error, you are good to go
-
If you want to test more, double click the room and:
-Create a rectangle and press F8, click export for actionscript
-In the Class field, write guzu.game1.Player
-Run it and control the player with right left up =>
[Player]Q:I tried adding a second attack for player, but when I add the actionscript for the second combo using the combo setup.html, it will stop doing the first attack, and won't do the second one neither.
I also just want two attacks, one that executes with the "a" key and the second one with the "s" key if possible.
A:Make sure you add them in the same combo script, and not separately. Also, to add the s key, you need to add the keys configuration at the player setup.html
[Monsters]Q:Is it possible to prevent monsters from bouncing back?
A:To prevent them from bouncing back, write in the first frame:
onDamage=function(attack){
return {go_back:false};
}
you can find the rest of them in the player.txt, last section.
-----
Q:Is it possible to add something like a visual range for monsters, so that at the begining, not ALL monsters go directly to the player?
A:It depends on you how you program the AI. But if you use the [attack and run.txt] file, you need to modify it a bit. Change:
start:function(){
ai.f.gotoPlayer();
to
start:function(){
if (ai.f.distanceToPlayer()<200) ai.f.gotoPlayer();
you can replace the 200 with anything you want.
-----
Q: I want to know if it is possible to add up to two or three attacks to a monster enemy.
A:There are many ways. But the simplest is just to add in the first frame of the attack:
if (Math.random()>0.5) this.gotoAndPlay("AttackA");
else this.gotoAndPlay("AttackB");
Note that this might be a bit buggy. Tell me if you face anything.
Or you can just randomly execute different combo setup function whenever random is called.
[Room]Q: I couldn't pause the game since I don't know how to add the "pause()" and "resume()" functions. Do I have to just write that in the first frame of the room movieClip?
A:Here is an example of pause and resume buttons:
[link]The pause() and resume() functions are Room functions. Read Room.txt for the rest of the functions.
Also, Room functions can be called from within actors and players through the reference screen. So you can write screen.pause();
-----
Q:I've noticed that after adding a limit object into the room, the camera will follow the character, but the character will be at the middle of the y axis, and I wanted to know if the character could be a little lower in "y" so that there is more "air space" for the life bar and background.
A:You can simply place a movieClip of class Actor inside the player and call it "followme". And then, in the first frame of player, write:
screen.follow(followme);
Can be found in the Room.txt file
-----
[MISC]Q:how to create a "GO>" like sign that appears when you clear an area just as in one of your games:
[link]A*:This might be the least prepared thing, but there is a trick.
On the Wait object, add the following in the first frame:
//
onStart=function(){
screen.goSign.play(); // or maybe _parent.goSign
}
//
Make a GO sign, and in the properties, make instance name goSign.
Make last frame of Go sign empty and add stop();
-----
Q:I managed to do the GO sign, and it works fine, but I have the problem that if remains in the stage and when you move, it does too, so I wanted to know if it was possible to make it static.
A:For the Go sign, you can use Background class. Background objects will move differently than the normal objects. And you can set their speed to zero so they follow the screen.
-----
Q:How can I add a life bar?
A:The player contains a variable called status["hp"]. So, if your player is called Player1, you can read its hp using Player1.status["hp"].
-----
Q:I did an item that heals the player, using guzu.game1.Attack, just as you did in the tutorials in the Examples folder. But I wanted to know if it was possible to make enemies actually drop items, and again, modify how often that would happen, like a random happening.
A:You can simply use create(item1,0,0) to make monster create item1. You can find this command in Actor.txt
To create the item when a monster die, you need to add a die frame and put the create in the die frame. You add a die frame exactly like you add the walk frame.
* answers with star need revising
Thanks to ~
Shi-Gu suggestion, I'll try to use questions to build up an FAQ for this Flash Game Maker.
I've got some feedback on the lastest ones and a couple more questions.
About the rest of the answers you gave me, I'll try to test a few more of them soon and some others will be used in a later game, but for now, I've got a couple new questions:
I wanted to know if there was some easier way to do this kind of messages pop up when you aproach the movieclip, that it pop ups as much times as you want, and that it disappears when you get away.
That would be all for now, and sorry for the delay with my feedbacks!
Thanks for all your support
first frame in the game: _root.HP=10;
first frame in the player: status.hp=_root.HP;
and on the hit frame, you could update it by calling _root.HP=status.HP
then you can just make the enterFrame of the HUD read the _root.HP
I am kinda not sure what the problem you have with the cutscene and HP is.
- Stage 1, defeat bad guys, and go to doorway
- Stage 2, same as above
- Stage 3, same as above
- Stage 4, defeat enemies, and then, I want a cutscene to appear after you reach a specific point (actually a hidden doorway) and after the cutscene comes a Boss Battle. The thing is, that after the cutscene, the game won't keep your HP points and it will make you start again with full health against the Boss.
What I want is that after the cutscene, you have the same amount of HP as you had before it.
Anyway, I sadly can't understand what HUD is and most programming techniques, so I kind of don't understand what you're telling me to do
It would be great if you could explain me with steps about where to place what and how to name each thing, just as in your youtube tutorials which are pretty straight forward.
That would be all about HP and cutscenes; Thanks for everything!
1-Your Doorway object must have an instance name, example door1
2-In the next room, you should have a Doorway object with the name door1. The player will appear from door1.
HUD stands for the head up display showing HP, coins, scores, etc...
Hope this works for you
deviantART muro drawing
Using doorways I can perfectly keep HP as it should work between stages 1 to 4; anyway, the doorway on stage 4 leads to the next frame, wich is a non playable cutscene. When the cutscene ends and we get to the Boss Frame, all HP is full, since it wasn't linked to the doorway on stage 4.
What I want to know is how to keep a record of the HP at the end of stage 4, keep it during the cutscene playing, so that when you reach the Boss Frame, you won't start again with full health, but with the health you had before the cutscene.
Hope I was able to explain better; doorways work perfectly though, thanks!
deviantART muro drawing
THNKYOU SO MUCH! This was the last thing stopping me from doing the game! Now I can start putting all together!
I just hope file size and that won't slow it down or crash Flash
Thanks so much Guzu