ranged detection on animated character
andy_the_baker
Member Posts: 25
okay, so my game so far has automated melee characters coming from two sides of a trench attacking each other or the other castle if it gets that far.
i'm trying to wrap my head around automated ranged characters. there would be several of these instances on the screen at once. i think i would:
1) create the animated model. this would have the animation frames and rules, and have it's own collision to detect bumping into other characters.
2) ???spawn an actor ahead of this model that would serve as a ranged detector??? i picture a wide rectangle in front to cover a range.
a) how would i attach this to the character model? i can't do it through the actor's spawn, so i would do it in the collision actor? (constrain x, y) would it know to do it to just this instance? or maybe some sort of characterID variable?
b) how could i pass information back from the collision to the main actor? i can see changing some global variable that the main actor would use to activate the ranged attack sequence, but that seems roundabout and untenable if there ultimately could be dozens of instances of the character throughout the game (i'm going to cap how many on the screen at once don't worry). i guess i wish i could change attributes on more than device, game, and self attributes.
any ideas or help would be greatly appreciated. thanks.
i'm trying to wrap my head around automated ranged characters. there would be several of these instances on the screen at once. i think i would:
1) create the animated model. this would have the animation frames and rules, and have it's own collision to detect bumping into other characters.
2) ???spawn an actor ahead of this model that would serve as a ranged detector??? i picture a wide rectangle in front to cover a range.
a) how would i attach this to the character model? i can't do it through the actor's spawn, so i would do it in the collision actor? (constrain x, y) would it know to do it to just this instance? or maybe some sort of characterID variable?
b) how could i pass information back from the collision to the main actor? i can see changing some global variable that the main actor would use to activate the ranged attack sequence, but that seems roundabout and untenable if there ultimately could be dozens of instances of the character throughout the game (i'm going to cap how many on the screen at once don't worry). i guess i wish i could change attributes on more than device, game, and self attributes.
any ideas or help would be greatly appreciated. thanks.
Comments