Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tropgrille on July 05, 2019, 02:56:08 PM

Title: [SOLVED] 2D Top Down Shooter - need help to do Enemy Follow
Post by: tropgrille on July 05, 2019, 02:56:08 PM
Hi

I m currently working on a game 2D twin stick shooter like binding of isaac.
I m not a programmer but I can understand c sharp script, and i’m a ok user of playmaker.
(note that this is a  4 player pvpve game, local splitscreen)

I cannot find a way to make the Enemy follow the player.

I have a trigger on the enemy that detect the player, i can get the player position but I dont find a way to move the enemy in my 2D environment.

Any help is appreciated.

Thanks!

Title: Re: 2D Top Down Shooter (twin stick BoI style) - need help to do Enemy Follow
Post by: PlaymakerNOOB on July 06, 2019, 04:40:12 PM
you would need something like the action Translate, and set that to your players vector3 to ensure the logic is sound.

Long term, you would probably want to use a tween, like DoTween for performance reasons.  They have translate, move towards, etc that would allow you to have hundreds of movement actions performed at the same time without penalty.
Title: Re: 2D Top Down Shooter (twin stick BoI style) - need help to do Enemy Follow
Post by: tropgrille on July 08, 2019, 04:06:39 PM
Thank you I finally made it work with Move Towards.
Not sure why it did not work the first time i tried, but my problem is now solved.

Thanks