Len's Forum Posts

  • Sorry that wasn't what I was looking for.

    Imagine a network of roads. Click on any location, and the player will take the shortest way (through the road network) to the destination.

    The left clicking on the roads in the example I gave should give you a better picture.

  • Hi there, I'm trying to make a way point system so that players can only travel on a specified road in order to reach the destination. Left click selects the destination, and the player is supposed to take the shortest road there.

    To some extent I was able to get it to work except that when it reaches places near the end of roads it frequently gets stuck and it has trouble turning around.

    Anyone can figure out the problem?

    File Download: dl.dropbox.com/s/ca5h6hfqwsws553/Waypoints.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ramones: That's EXACTLY what I had in mind. Thanks!

    GenkiGenga: Ty again :)

  • GenkiGenga

    Thanks for the example, it helped a lot. I was wondering if there was a way to simplify it further so that you can handle any number of overlaps.

    Something like Pick Sprite2 instance n times, and update the overlap variable to = n.

    Nimtrix

    Thanks for pointing that out. I came across drop box a couple of times on the forum and kept thinking it was forum feature that allowed you to attach small files haha. Got an account now :P

  • I have a problem combining these two conditions together.

    Clicking anywhere creates an object with an AoE ring around it. I want the object to change colour when there are more than 4 objects in its AoE ring.

    Been using

    If AoE is overlapping Object

    For Each Object

    Trigger Once

    Add 1 to UnitCount (AoE instance variable)

    Right now I can only get it to increase by 1 or overshoot entirely due to Trigger Once not working.

    EDIT: How do you attach files -.-, I only see add hyperlinks / images / emails.

  • Sorry for the late reply, after some thinking I eventually found an alternative to using random multiples and forgot to check back. The solution was helpful though, it was quite a neat trick :)

    Thanks anyway!

  • Just a quick question, is there a function which allows you to randomly select whole number multiples of a number?

    eg. If number is 128, function will randomly pick one of these numbers 2,4,8,16,32,64.