Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Looking for example or tutorial on map editing and collision detection

    General Discussion
    2
    4
    227
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tdg8934
      tdg8934 last edited by tdg8934

      I found video tutorial code For spriteAnimation to walk a knight sprite up down left and right over a simple map I made with a grass tile repeated and random plant bushes. I created through the map editing tool a collision point flag and rectangle collision area. I can’t seem to get the code right to detect when the animated sprite knight collides with the plant tile. I have been looking through the help but I’m missing something.

      On another note: Since I have 2 Nintendo Switches being shared by the family I never know which one I can access for my code. I bought another copy of Fuse4 and shared my program code between Friends (me) . That’s pretty neat.

      waldron 1 Reply Last reply Reply Quote 2
      • waldron
        waldron F @tdg8934 last edited by waldron

        @tdg8934 iv actually got the code for the knight program i can share tomorrow if you want to DM me your friend code i can share it to you.
        as for your map detection you want.
        collidemap(sprite)

        tdg8934 1 Reply Last reply Reply Quote 1
        • tdg8934
          tdg8934 @waldron last edited by tdg8934

          @waldron

          Thank you again for all your help. It’s a shame the tutorial videos are not listed or there is code to download. But since my last email, I just rewatched the Video tutorial on the knight animation again and entered it into my program manually.

          As far as Map marked area collision with the knight animation sprite, I would think I should use something like:

          loadMap(“Map1”)
          setSpriteCamera(0,0,2)
          :
          C1 = collideMapArea(“Bush1”, knight)
          :
          loop
          centreSpriteCamera(0,0)
          clear()
          drawMap()
          :
          If C1 then
          print(“Hit”)
          update()
          endif
          :
          repeat

          Where Bush1 is a flag marked area (or rectangle marked area in yellow) of a position on my Map as I created a map in the Tools->Map Editor. When I move the knight animation sprite over or near the marked areas on the map, I never get a collision indication.

          Ideas?

          waldron 1 Reply Last reply Reply Quote 0
          • waldron
            waldron F @tdg8934 last edited by waldron

            @tdg8934 To be honest typing it in manually will help in the long run, as for map collision try this
            https://fuzearena.com/help/view/Map Editor
            if you just draw the box it will handle the collision no need to write in the box unless your wanting something different to happen. iv also added in my namemaplocation video below https://fuzearena.com/forum/topic/1141/youtube-tutorial-on-named-map-locations

            you can also add layers by
            drawmaplayer(0)
            drawmaplayer(1)
            then if you wanted you can draw your sprites in between layers

            1 Reply Last reply Reply Quote 1
            • First post
              Last post