Spawning on screen

I am working on my first mobile project and am getting hung up on a cannon ball setup I am attempting to code. What I am trying to do is have an actor "cannon" shoot another actor "cannon ball" horizontally once the actor "player" is on screen. The problem I have now is cannon balls flying all over the place instead of spawning when player comes on screen. Anyone help?


  • bufteabuftea Member Posts: 43

    can you please describe the rule that you created for spawning? Also what do you mean by actor "player" on screen? Your player can get out of the main window? How do you get it back in the main window?

  • Dayton App CompanyDayton App Company Member, PRO Posts: 12

    Hey Buftea the code I have rigged together was the cannon would spawn the cannon ball if the player comes with a certain distance of the cannon. This being my first time coding im positive I didnt piece the code together correctly. "Player" is my playable character. I guess my main question is how would I go about writing a code that spawns a cannon ball once "player" gets within X amount of distance?

Sign In or Register to comment.