Ive been making a game for a couple of weeks now, and have encountered a problem which I can't figure out. I'm using pmo for the ai of the enemies, and each enemy has two parts arms(which rotate 32 directions)and the body. The coding is fairly simple and all ive done is create an object on the player when they have activated the enemy, always have the body & arms look at that object and if the enemy is facing left or right, "player is pressing left/right" accordingly. Now it works ok, with a few bugs but I just can't get more than one enemy working. I've changed all the relevant events and stuff to a qualifier in case that would help, but it doesnt make any difference.
The enemy guys dont respond, and once one has been destroyed, all the arms for all the other guys are destroyed too, not the body, even though their both instructed to be destroyed...
There must be another way, i've thought about having objects at enemy locations and creating the arms and body that way instead of copying, but I have no idea on how i would come about that.
I hope all that doesnt look too confusing.
Thanks for your time
the part about when the enemy being destroyed all the arms and legs or whatever dissappear. let me guess. when you attack the enemy a number is added to A,B,C etc value of body and when that value is a certain number destroy the the body and limbs, or when collision with body destroy it and limbs. only one body will dissapear cause its the only one with that value or is being hit but when you have it destroy the arms along whith body it thinks you want to destroy all of them. end result all limbs dissapear. at least thats whats happening to me in a tank game im trying to make. the tank and its cannon would dissapear along with all the other tanks cannons but the tanks would still be there.i couldnt figure it out either. im working on it though. this would take along time but animate the body with arms in all 32 directions.
Actually I've assigned the enemy guys to a qualifier (bad) and every hit of the a bullet subtracts 1 from alt value. The enemies body is the one with the qualifier, not the arms. When alt value = 0, destroy bad and arms.
thats basically what i said. except your using a qualifier instead of one of the values for the enemy object. it still thinking when the body is destroyed to destroy all arms cause theyre not included in some sort of value.
hold on, i had an idea. im gonna test it out.
whatever you do, dont delete this feed.
also make a value or qualifier for the arms
if the arms are overlapping the body always set their value to bodies value
then just like you have body<=0 destroy body or bad put when arms<=0 destroy arms
this should only set the value of the arms of the enemy your attacking to the value of the body so when the body=0 so do the arms and only those arms are destroyed. hope i said that right and it makes sense.i hope it works for you. it worked in my test.
When you run SPREAD A NUMBER, it takes each object in that collection and assigns a number to it, then steps it. For instance, say you have three instances of the GUARD Object. If you were to spread the value 1 on the GUARD Objects? The first guard would have the value 1. The second, 2, and the third, naturally, 3.
This has a whole array of other uses too. It's a great way to assign unique IDs to every enemy. Once you've done that, you can easily use a FASTLOOP to run a routine for each guard ONE AT A TIME. You could make ONE guard shoot a bullet and run it through a fastloop, so that when it strikes you have a way of knowing where it came from. Of course, you could shoot the bullet and assign the Guards now-unique ID to the bullet too.
If you have an event like 'When GUARD is stopped', it'll only run if atleast one guard is stopped, right? Well some people don't realize that it'll select ALL of the guards that are not moving. Spreading a number then will only affect stopped guards then. I don't know why you'd do that there, but you can. Maybe you could do it to assign goal markers for movement? 'Create marker', 'Set marker to guard X/Y', 'Start Guard moving'
It's terribly useful. I found it pretty handy for my pathfinding work.
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell
why do you use the platform extension in a top view game? I could look through you cca, but I dont have the extension, and having some problems installing the bonus packs...If you remove the platform extension I could help you.
And I am really curious - what are you using the extension for in your game!?
Lol, alotta hope you've got there . Well, if the problem is that when the alterable value goes to 0 and EVERYONE DIES, then i have a solution... I always had this problem, it was a big reason why i sort of gave up on alot of games and on TGF for a little while. Assault Andy gave me some advice on a "war game with stats" thing earlier, he said:
"I think you need to learn about alterable values. They are counters which each object has 'internally'. They are independant of other objects. Here is a short example of how you would use them:
Click on active1 >>> add 5 to alterable value A of active1
Alterable value A of Active1 is greater that 15 >>> Destroy"
Notice that its not "when value A is 0", its when its UP to a certain number, it was the same mistake i made with alterable values, but now i've finally figured them out correctly and its awesome! lol.