A
anthropus
Guest
Hi all. I have a 'bomb' type object in my game, and I want this bomb to deal different damage to enemies depending on enemies' distance to the bomb object--the closer they are the more damage, the farther away the less damage, etc.
My problem is I dont know how to make the bomb 'speak' to all the specific enemy instances within a certain range, and all the specific enemy instances within another range, and so on. I know how to make the bomb 'speak' to all instances of an object, or the instance it collides with, but not to specific instances within specific ranges. I really need help with this, my noob level makes the solution invisible to.
I'm guessing I need to make a variable that holds all the instances' IDs of different ranges to the bomb object, but HOW do I make such a variable? Is that even what I should do?
something like this i think:
var enemies_within_close_range=... //how do i make that kind of variable?
var enemies_within_far_range =...//how do i make that kind of variable?
then I would just put
with (enemies_within_close_range)
{
blah blah blah //this part I can do.
}
//etc
thanks!
My problem is I dont know how to make the bomb 'speak' to all the specific enemy instances within a certain range, and all the specific enemy instances within another range, and so on. I know how to make the bomb 'speak' to all instances of an object, or the instance it collides with, but not to specific instances within specific ranges. I really need help with this, my noob level makes the solution invisible to.
I'm guessing I need to make a variable that holds all the instances' IDs of different ranges to the bomb object, but HOW do I make such a variable? Is that even what I should do?
something like this i think:
var enemies_within_close_range=... //how do i make that kind of variable?
var enemies_within_far_range =...//how do i make that kind of variable?
then I would just put
with (enemies_within_close_range)
{
blah blah blah //this part I can do.
}
//etc
thanks!