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)