Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17063

Unity - Script worked fine, until I made the object a prefab...

$
0
0

Hello,

I'm working my way through the platformer tutorial by GamesPlusJames, and reached the part with the flying enemy. I followed the tutorial without a hitch, and now have a script giving the flying enemy a perimeter around her, in which she follows the player whenever he's inside the perimeter, and facing away from her (like the ghosts in Mario).

Unsatisfied with an idle enemy that you can just shoot while facing, I decided to add something into the code myself so that if the enemy has been damaged, she'll follow the player regardless of his position …


Viewing all articles
Browse latest Browse all 17063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>