is there any way to pass a parameter to a new object?

fangang191fangang191 Member Posts: 4
edited November -1 in Tech Support
is there any way to pass a parameter to a new object? so i can make every new object(actor) different .

Comments

  • fangang191fangang191 Member Posts: 4
    like there are some towers they make arrows point at enemies, so different arrow should point at different enemy, how can I get enemy's position from tower. --tower decide which enemy to shoot.
  • PPenguinPPenguin Member, PRO Posts: 110
    Cool, so you're doing a tower-defense type project? Nice! :)

    The way I would solve this is to use the Constrain Attribute behavior on each enemy, so that it saves their position in a variable.

    Then, with each tower, watch for when the value of those variables become "in range" of wherever your tower is, and if it is, fire at it!

    Good luck!
Sign In or Register to comment.