dop2000's Forum Posts

  • If you don't want to change elevation for each individual object, then families is the way to go.

  • You need Touch.SpeedAt() and Touch.AngleAt() expressions.

    Try something like this:

    On any touch end:
     Ball Bullet set speed to min(Touch.SpeedAt(0), 500)
     Ball Bullet set angle of motion to (Touch.AngleAt(0)+180)
    

    Instead of Bullet behavior you can use Physics if you like - apply physics impulse at angle.

  • FadeOut is still finishing playing when you start FadeIn. Change the wait time to 1.1s

  • Add an invisible sprite with Tween behavior, or use any existing static object. The object doesn't matter, as long as it exists on the layout and has Tween behavior.

    Run "Tween (value)" action.

    In "Tween Is Playing" event set layer elevation to Sprite.Tween.Value

  • Are friendly units also members of this family? You can define an instance variable "isFriendly" on it, and use it to distinguish friends and enemies in this event.

  • The most straightforward solution is to create multiple animations (for example "WalkRed", "WalkBlue", "AttackRed" etc.), or multiple sprites - PlayerRed, PlayerBlue.

    Or you can try Replace Color effect.

  • To load "Buildings" into an array you need to do something like this:

  • I believe for "Array Load from JSON" to work, JSON string needs to be in a specific format, something like this:

    {"c2array":true,"size":[10,1,1],"data":[[[.......
    

    I guess the easiest option is to loop through all entries in "Buildings" every time you need to find a specific building.

  • Add two variables CellX, CellY.

    On every tick
    If CellX not equal Tilemap.SnapX(Mouse.x)
    OR CellY not equal Tilemap.SnapY(Mouse.Y) 
    	-> Set CellX to Tilemap.SnapX(Mouse.x)
    	-> Set CellY to Tilemap.SnapY(Mouse.y)
    	-> ... other actions
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You do not have permission to view this post

  • Use Debug Mode (Ctrl-F4, Ctrl-F5) to see what's causing performance loss. You can see how much memory images are using, how many collision checks are made every tick etc. Profile tab shows which event groups are most CPU-intensive.

    For example, on my laptop "Level Building" group was using 17% CPU. After I changed event 35 from running on every tick to On Start of Layout, it dropped to 0%!

    .

    Also, search this forum and tutorials for performance tips, there have been several posts with lots of useful info.

    construct.net/en/make-games/manuals/construct-3/tips-and-guides/performance-tips

  • You do not have permission to view this post

  • It depends on what you are trying to do. If you want to make an effect of something smashing into pieces, you can add a sprite with say 20 frames, representing different pieces. And then create 10 instances of this sprite with random frames.

  • felipenune Use Array.AsJSON expression.