How do I Spawn Multiple Actors at multiple locations as I progress upwards
hzapps
Member, PRO Posts: 173
Aloha everyone,
This is my first game and it is a a shooter game in Portrait mode. I start from the bottom and progress to the top.
I have not been able to successfully generate, say two enemies at a time, just off screen when I cross certain points and have them begin to slowly move towards me shooting towards me as I progress upwards.
I have tried adding a invisible spawn actor that when I cross it generates them. It only generates one, It moves with me and doesnt shoot. I saw a suggestion of placing the enemy actors along the way and changing their alpha to make them appear as i get closer.
I cant find any tutorials to show me recommendations. I would be destroying them with a bullet or grenade.
I am sorry for the stupid question. I just cant seem to make it work.
Any thoughts also on how to put a delay between how often I can throw grenades, like 3 seconds? Timer to change an attribute?
Thank you to all of your forum comments. they have all been helpful in producing this game
Hang Loose
Mike
This is my first game and it is a a shooter game in Portrait mode. I start from the bottom and progress to the top.
I have not been able to successfully generate, say two enemies at a time, just off screen when I cross certain points and have them begin to slowly move towards me shooting towards me as I progress upwards.
I have tried adding a invisible spawn actor that when I cross it generates them. It only generates one, It moves with me and doesnt shoot. I saw a suggestion of placing the enemy actors along the way and changing their alpha to make them appear as i get closer.
I cant find any tutorials to show me recommendations. I would be destroying them with a bullet or grenade.
I am sorry for the stupid question. I just cant seem to make it work.
Any thoughts also on how to put a delay between how often I can throw grenades, like 3 seconds? Timer to change an attribute?
Thank you to all of your forum comments. they have all been helpful in producing this game
Hang Loose
Mike
Best Answer
-
mhmma Posts: 5you have to make 2 game attributes ...
playerx and playery
now in the player actor put the behavior
constrain attribute
then insert in the first field
game.playerx
in the second
self.position.X
add another constrain attribute
then insert in the first field
game.playery
in the second
self.position.Y
now in the enemie ... put an move to behavior .. insert in the x box
game.playerx
and in the y box
game.playery
this should help you to let the enemie follow the player ...
rotating the enemie and shooting in the right direction to the player is a little bit tricky ...
Answers
HELLLLLLLLPPP!
Still cant get enemy actor to move towards warrior and shoot