toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
Feedback
›
Tech Support
is there any way to pass a parameter to a new object?
fangang191
Member
Posts:
4
November 2009
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
fangang191
Member
Posts:
4
November 2009
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.
PPenguin
Member, PRO
Posts:
110
November 2009
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.
Comments
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!