I have began to develop a game about my movies main character, The bankrobber. You can see all my movies here: http://www.mapix.shorturl.com . Its in swedish though but you should understand them anyway, its not very much talk. Just do this:
Click "Gå in"
Then, in the menu, click "Ladda ner" wich means "Downloads".
There is the page where you can download my cartoon movies. They´re very violent but nobody here should be offended. (To see screens, click on the movie title, to download, click "ladda ner" to the right in the table.)
Back to TGF. As I said, Im developing a game about my present main character. Its called The Bankrobber 2 - the game. Its a platform/action game wich you see like Mario or whatever. My problem right now is those:
*My first real enemy is shooting every third second, I used the "timer" to do that. But the problem is, even after you shoot him down, he continues and rises every 3 sec. to shoot and then his back alive. Ive tried to do stuff like "paste into background" and then "destroy" but it wont work. Im sure Ive done something wrong but I cant find it. So I would need your help. Maybe right here, if you can tell just by reading this, or I can send the gam-file over MSN messenger. akrushmi@hotmail.com is my adress.
*My second problem is the "power-meter". You know, the life that will decrease if the character get hurt and increase if he gains something healthy. In this game it will be Coca-Cola
I simply dont know how to make this "power-meter". Not at all. Neither do I understand how to create lives to the character, so it will be Game over if he dies more than 3 times for example. The same thing is here, you can answer on this board or simply add me on MSN: akrushmi@hotmail.com
To talk, and I can send the file for you to examine it.
One more thing. Please dont complain on my english, Im from Sweden and not an english speaking country
Okay, for the first problem with the rising enemy, do something like this:
every 3 seconds
+Enemy value A = 0
----shoot at player (or whatever you do here)
Bullet collides with enemy (or the condition that kills the enemy)
----destroy enemy
----set value A of enemy to 1
That makes it so that the enemy will only shoot when his value a is 0. As soon as it dies, the value is turned to 1 and the shooting action will no logner apply.
On to your power-meter problem. You will need to use the counter object.You will need to set its maximum value to the maximum amount of health the player can have. Then you would type this code:
Character is shot:
----subtract (# here) from health counter
Character gets coca-cola:
----add (# here) to health counter
Now to do lives, you can use the lives object. Simply tell the game to subtract a life when the power meter is down to 0. That's all.
Thanks for the help. Now I have another problem, though.
Nu har jag rett upp allt ovanstående. Nytt problem
Im gonna imput a questin. When the player collides with a door to a toilet, a question shall appear: "Enter toilet? Yes/No". I thought this was very easy and it first seemed that way, too.
Ive done this so far:
Createt a new object, a Q/A-object. The question is as I said. Yes is the right answer. I placed the question outside the playfield for then.
I fast kicked my ass into the event editor. New event - when Bankrobber (the main character, active obj.1) collides with "toilet door", ask question. I decided where on the screen to ask it.
New event again: If right answer, jump to level 5: toilet. Then I thought I was finshed. But no. When I test to play the game, it wants to ask the question immediatly. And since I placed it outside the playfield (so that the player dont see it fucking up all the graphics and just look ugly before it shall appear) nothing will happen. Theres no bankrobber to play with and no question to answer.
If I place the question in the playfield, it appears when starting the level. This make the level work but I dont want the question to be asked immedialtly. As I said, its supposed to appear when colliding with the door. Someone who can tell what to do?
If it helps, my MSN is akrushmi@hotmail.com , feel free to add me. I can send the file for some checking then.
If you right click the Q/A object and select properties -> display. Uncheck the check box that says "visible at start". Now is should not display the message straight away
Quote "Total":"You stupid Nebie" - "Your are all retards" - "This is and Example for any other retards out there"
dude, why be a Jackass, you were a Newbie once! if your not going to say anything nice then DONT say anything at all, So be Helpful, dont be a Jackass!.
Total: Yes, I am a newbie.
But you seem very stupid, cos if you would have read the replies in the thread, you would have discovered that I already fixed that problem. You are the retard for sure, cos you cant read.
I cant find what you mean.. Im sure its there somewhere but I cant find it :S
Im in the Level editor and right click the q/a-object but there is no properties to choose. Only a bunch of other stuff. Neither in the event editor I can find the properties. Help me
Now I have another question (I suck, I know)!
Its like this:
When the player comes to a door, a question appears: "Enter toilet? Yes/no" and if he or she chooses Yes, he/she will enter a little toilet room wich is a dead end. When the player exits the toilet, he shall come back where the door into it was, and with the same enemies killed. How do I do this? It allways gets like he must start all over the level and kill all enemies again. It must work in some way but I dont know how.
As allways, I really appreciate help!
It's comedy when someone calls someone else a retard or the like and comes off like a bigger retard themselves. What the fuck's a "Nebie," and what does "Your are all retards" mean?
Mattis: You will need to use either INI or a global storage object (1000 Global Values is fine). You'll also need Cellosoft's Fast Loop object.
Add all of your enemies (that die) to a qualifier, i.e. Group.Enemies. Now add these events:
• Start of Frame
(Group.Enemies) : Spread value 1 in Alterable Value A (you can use any free Alt Value, but make sure you change the other events in this post!)
• Start of Frame
(Fast Loop): Start loop # 0 for Count( "Group.Enemies" ) loops
• (Fast Loop): Loop Trigger # 0
+ (Compare 2 general values) getgloval( "1000 Global Values", Loop Step( "Fast Loop object", 0 ) + 1 ) equals 1
+ Alterable Value A of (Group.Enemies) = Loop Step( "Fast Loop object", 0 ) + 1
(Group.Enemies) : Kill the enemy (whatever code you use to kill the enemy, you put it here)
• (Event where your enemy is killed)
(1000 Global Values) : Set Global Value Value A( "Group.Enemies" ) value to 1
For other levels, you'll need to change the value you spread AND change the + 1 part of the expressions above, to the value you spread + 1. Example:
Spread value 20 in Value A
Loop Step( "Fast Loop object", 0 ) + 21
You must make sure that the spreaded values do not overlap the other levels'! To avoid this, set the value to the number of enemies in that level.
I have another problem now, but its more "bug related".
In my title screen, I simple want music playing. I choose one of the MIDI-files wich came with the Games factory download. New event - always - play and loop March06 - play 10 times (for example). Nothing wrong, eh? If it is, I cant figure.
But when I try Run Game/Level, the game fucks up. The music wont start, and nothing works. The only thing to do is ctrl+alt+del and quit TGF. Very irritating. I cant do a game without music.
Anyone who had the same problem, and knows how to solve it?
The problem is the you used the "Always" condition. That will make your action repeat continuosly and since it has no time for the music to play, your game screwed up.
Replace "always" with "Start of Frame" and you should be fine.
Hm, I think you mean "start of level". At least, that worked. Thank you very much! I wish more people were helpsome to newbies and not as total, a jerk, or as we say in Sweden, a fjortis. (Dunno if that means something in english though)
ShadowCaster>
Please change back, thats not my present problem, that was my first! It was ment as a thread where I could write all my future problems, I find it unnecessary to create a new every time I will face a problem.
Well well, I have another question for you all.
I want help with adding a shop to my game. Is it easy? When you´ve killed 10 enemies, for example, you´ve earned 10 litres of blood. For that, you can buy something if you find the right place. Easy or hard to do?
I also need help with the score feature (blood). Its like, when I shoot an enemy, I earn 5 points, but if I shoot him again even after his death, I earn five more and so on... I want it to be possible only once.
I know I can do like "destroy and paste into background" but sometimes that doesn´t work and the enemy just dissapears, I dont want that.
Ok, to go into a description of how to properly use the ini to save values/strings would take a while, so here is how to do what you want with a global value...
When you shoot an enemy, and alterable value A is different than "dead value"
add 5 to blood score.
Then...
End of Level - Set global value # to blood score
Start of Level - Set blood score to global value #
Just remember to reset the global values when you start a new game, or a player could get lots of points, restart, and keep the points.
Now, when you enter a shop it sets your blood score to the global value...
If Blood score is greater or equal >= to ##
User clicks on button "buy bazooka", etc.
set weapons global value to ##
Subtract ## from blood score.
Now, just add at the start/end of every frame setting the global value to the weapons allowed, or weapons allowed to the global value.
Then add this to your firing event, depending on the value of the "weapon bought".
Firing Events
Global value(Weapon bought) = 0
---Punch---
Firing Events
Global value(Weapon bought) = 1
---Shoot---
Firing Events
Global value(Weapon bought) = 2
---Bazooka---
Firing Events
Global value(Weapon bought) = 3
---Nuke---