How do I fix this npc?

0 favourites
  • 6 posts
From the Asset Store
Fantasy RPG Human-NPC assets pack of 15 characters
  • Hi, I'm trying to make a simple npc fly into the middle of the layout, collide with an item then turn around and leave with it. So in the middle of the level are 6 boxes. i need the enemy to come in and randomly move to one of the boxes then pick it up then just leave the level at a random angle.

    i tried making it move to the box by using the rotate to location (box.x) (box.y) then on collision pin the box to the enemy then rotate random(360) but the enemies either pickup a box thats already being carried or they keep circling boxes or they cant pickup a box while another enemy is holding another box. I feel like this is a really easy thing and im missing something. please help!

  • Are npc and enemy two different objects or the same? What kind of game this is (top down, platformer etc)?

    Please post your capx, it's impossible to figure out what's going on without it.

  • dropbox.com/s/3wuapvkcoeqn8eg/New%20project.caproj

    thats my project there. the yellow enemy (npc) hasnt got any event attached to it now because I got frustrated and deleted it. I'm trying to make it spawn from one of the spawners. choose a random "Asteroid" to fly to and pickup then spin a random amount of degrees then leave the level but i cant get it to work properly. thanks for the help :D

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think this could help

    drive.google.com/open

    Cheers.

  • I think this could help

    https://drive.google.com/open?id=1dM3J88Upb82uO_8bH9c0_TJXnf2oUxjo

    Cheers.

    dropbox.com/s/3avv4ej43xdu0n2/New%20project.caproj

    Hi Maverick1921, I've attached my game but I cant seem to get it working. I'm also trying to have multiple enemies on at the same time and it seems they pickup a few boxes or spin around sometimes or another npc picks up a box an npc is already carrying. Thanks again for the help :)

  • You need to save your project as a single file (.CAPX) and post that CAPX, not the .caproj file.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)