How do I get only one zombie to attack? Meaning that only one is in range while the other is quite far. When they reach that certain range, they are supposed to attack. But when I copy the zombie, both of them attack at the same time. The rest is pretty much okay.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
24th December, 2007 at 20:40:40 -
I take it you are probably comparing general values or using some sort of general condition. What you have to do is use a condition which will compare each of the actives seperately. One good way to do this would to have the condition:
Always set Alterable Value A of the Zombie to the distance between the player and the zombie (calcualted with maths or an extension.)
Then have the condition:
If Alterable Value A is less than 200, make them attack.
This will check each zombie individiually to see if its Alterable Value A is less than 200.
Ahhh, its not working. I've done what you asked me to do as in make the conditions based on alt values of the zombie but they still attack at the same time.
Klikteam products (MMF/TGF) work on a difficult to predict principles for the event editor.
In the event editor list, on the left hand side, you see a column of actions, followed by the row of events that occur during that action. For example, and action might be
"X" collides with "Y"
What you need to understand is; actions that take place after these conditions will be automatically happening restricted to objects defined in the event on the left.
So for example, if you write:
Value A of "X" = 1
"X" collides with "Y"
in the same action-
First, it will limit the selection of "X" objects it will check to just ones with value A of 1, then it will check for "X" objects overlapping "Y" objects. You need to remember the editor will read these qualifiers TOP TO BOTTOM, so the selection of objects to check will be narrowed down accordingly.
Nextly, objects that the actions occur upon, for example if you add a "SET VALUE A TO 100" event, will apply to ALL objects of that type unless otherwise restricted in the qualifiers. So if you have an event:
"ALWAYS: SET OBJECT 'X" VALUE A TO 100"
it will set the value of EVERY object "X", not just a single copy of it.
However, if you have:
"OBJECT 'X" VALUE A = 1: DESTROY OBJECT X"
it will only destroy object "X"'s that have a value of 1.
Thus, if you want to limit an event, for example "Zombie Animation --> Attack" into only affecting a single zombie at a time, you need to have some reference to these zombies in your qualifier for the action. For example:
if "X of Zombie < X of Player + 100"
then "Zombie --> Attack"
Will only affect the zombie in range, because you singled it out in the event qualifier.