dop2000's Forum Posts

  • I changed you example, take a look:

    dropbox.com/s/06c1xqlquzhyeig/TileWorkaround2.c3p

    Also, check the official Pathfinding template, it shows the generated path.

  • Look closely at my code. "Submit is clicked" is the parent event. It has a sub-event where you compare multiple checkboxes. Else condition is under that sub-event, on the same level.

  • You can add that invisible sprite to a container with the 9patch. Make sure that their origin image points are the same. Then simply do this On start of layout (or On Every tick):

    Sprite set position to (9patch.x, 9patch.y)

    Sprite set angle to 9patch.angle

    Sprite set width to 9patch.width

    Sprite set height to 9patch.height

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you are confusing Tile Movement and Pathfinding. These behaviors are different, and Tile Movement doesn't have pathfinding feature. That's why your character sprite bumps into solid walls.

    I suggest calculating the path with Pathfinding behavior (you can disable diagonals in it). And then move the sprite with MoveTo behavior, using the waypoints calculated by Pathfinding.

  • Browser On Back button : System go to layout StartScreen

    Or you can open a menu, or pause the game or do anything else. But you can just tell the app to "go back" or "go home", it doesn't work like this.

  • Check this example, it loads 3 images into sprites:

    dropbox.com/s/oybhqgus121bas2/LoadMultipleImages.c3p

  • No, you can't scale the image inside the Tiled Background. That's why it's called Tiled Background.

  • I bet if you return to this code in a week, you will not be able to remember what all these sprites and UIDs mean.

    This is not how you should program in Construct! Use families, containers, instance variables. Don't use Pick by UID, it's rarely a good idea, and definitely a very-very bad idea in your case.

  • This is the most horrific Construct code I've seen in my life! You have over a thousand sprites and you don't name them? You have 150K+ instances and you pick them by hard-coded UID? I will have nightmares about this screenshot..

    I can see one definite mistake - you are trying to pick a different instance with a different UID in a sub-event. You can't do this. If you need to pick another instance, you first need to add "System Pick All" condition.

    Sprite pick by UID=1 : Sprite set Visible
    
    	System Pick All Sprite
    	Sprite pick by UID=2 : Sprite set Invisible
    
  • If you don't want your enemy to move while shooting, remove "Find path" from that event. Save player's position in a pair of variables. When player is no longer in line-of-sight, then find path to its last saved position.

    Another option is to set pathfinding speed to 0 when player is in LOS, and reset to normal speed when not in LOS.

  • Well, your event #7 is wrong. It doesn't affect one infected cell, it affects all currently infected cells, restarting Sine for all of them, changing scale back and forth...

    If you want every infected cell to shrink over time, use Timer behavior, or Sine/LiteTween (with a long period time). But you need to do for one created instance, not for all instances at once. You can start the timer in event 5 and 6, immediately after spawning the infected cell. No need for a separate event #7.

  • AllanR has explained you how to do it - set frame 0 on one sprite instance, load an image. Set frame 1 on another sprite instance (or pick an instance with frame 1), load another image. Repeat as many times as needed. Your sprite should have enough empty frames, and animation speed set to 0.

  • It should work the same way on Android. You probably have a mistake in your code, you need to post your project or a screenshot of events.

  • You still can add these objects into another family (one object can be a member of multiple families). But of course, you will not be able to access behavior properties if they are defined in different family.

    Maybe you can use "On created" event for each family to set some properties.

  • One way to do this is to add all such objects into a family. Then, after you created an object, add a sub-event "System Pick last created Family". In this sub-event you can change properties of the newly created instance, for example "Family set angle to 90"

    If you need to change behaviors or instance variables, you will need to define them on the family.