Hi I'm new to the forum and I been using TGF2/MMF2 for our technical class at our school. I'm making a 1945 Joint Strikers-like game if your wondering. I have several questions and if you could please help, I would really appreciate it.
1. I made a counter object that I'm using as a health bar and I got that part done, but my problem is if there's any way that if the counter reaches 0, a live is subtracted from Player 1 and resets the health bar and repeats the process?
2. At the end of each level, I have made a boss and I made a boss health bar too. The problem is similar to 1 except instead of subtracting a life, it destroys the boss instead.
3. Is there a way to make it when the object/Player reaches a certain point/area, an object(s) appears? (I.E. Once my plane gets to the close to end of the level, the boss appears)
4. This isn't something really huge but would be a nice feature. My game is a vertical shooter so I set the Scrolling to follow the object but is there any way to make the frame scroll instead of having the frame scrolling when the object/Player moves?
1. in the event editor start a new condition, choose the health counter. select compare value, then make it = 0, then scroll along to the counter in the grid and select it, choose Set counter to (your number). then select the lives counter and select subtract 1, youll also want to go to the special condition box in the grid and select "limit conditions" and select the "run once on loop" option.
2. start a new condition and select the boss health counter, select compare value and then put 0, then scroll along to the grid for the boss, then slect destroy.
3. this is a little tricky, you need to decide where in the frame you want this to happen the, start a new condition and select the player/object, select position, compare xvalue, then enter your desired location, then you want to scroll to the "Creat objects" grid square, then select you boss character and click create at, then choose the location you would like the character to appear.
4. you could just do this, new condition, Select the "special conditions" always, then select story boardcontrols, then select the verticle option and then set it to +1 of player Xposition.
I hope this helps, there are much better ways of doing this but these should all work ok. Good luck. Oh and if anyone notices a bad mistake please let Law know before i ruin his work.
Hey Antworx, thanks for your help! 1 and 2 were successfully done thanks to your help. I followed your exact instructions on 3 and 4 but nothing really happened. Another thing I did was when the player was destroyed, it would respawn but it was buggy and I somewhat forgot how to do that.
Edited by the Author.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
16th May, 2008 at 01:04:00 -
4. - Won't work with Antworx's example because his code makes the screen focus on a point 1 pixel infront of the player. (Ship x + 1)
It's really hard to know exactly what to tell you to code because we don't know how your game works. But basically what you need to do is create a new counter.
Since you have a vertical scroller, I don't know if your ship starts at the bottom of your frame and moves up, or what. But if it does that then you will need to:
Start of frame - Set counter to Y position of Ship
Always subtract 1 From y position of ship.
Always set screen Y position to the value of that counter.
However then your ship won't be constantly moving forwards. I think one way you could fix that is to go to the properties of your ship and under scrolling options turn on "Follow the Frame". This will mean that the ship will move independent of the frame. Another option would be to use a custom movement.
3. Antworx said you should check against the X position. You are doing a vertical scroller, so the movement will be on the Y axis - try fiddling with that instead.
Hmm thats odd, I guess my reply didn't post. Well I tried all the things you guys mentioned but none have actually worked . My real problem is how to make power-ups work after the player picks them (such as if player gets a gun power-up, etc). I had an idea on what to do on the powerups but it didn't so I delete the event. The other is how to make the game wait a X amount of time after the final boss is beaten. I thought that insert a timer object might of worked but it didnt.
- Create an alterable value on your player.
- If pick up a power up, then add 1 to this value.
- And to finish, you just have to use this value in a math formula for the amount of damage done by your weapon.