ranged detection on animated character

andy_the_bakerandy_the_baker Member Posts: 25
edited November -1 in Working with GS (Mac)
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.

Comments

  • andy_the_bakerandy_the_baker Member Posts: 25
    one time tiny bump to see if anyone has ideas; then either ranged character auto shoots while moving or stopped, or perhaps i try to make it work with one actor that's 256x128 and animated on one side.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Eastbound has a Tower Defense demo where his sensor actor is invisible and the visible portion is just a particle representation of the image generated by the invisible sensor actor. Check it out.
  • andy_the_bakerandy_the_baker Member Posts: 25
    will do. thanks for the heads up.
Sign In or Register to comment.