dop2000's Forum Posts

  • What would the differences between moveto and bullet be (I haven't used moveto)? Sounds the main addition would be setting a target destination and rounding/truncating the last step for precise movement. Maybe adding this functionality to the bullet behavior would be good?

    oosyrag I guess it can be added to bullet.

    MoveTo also has MaxSpeed setting, and different settings for acceleration and deceleration. So it's very easy to make natural looking movements - the object speeds up, moves at constant speed and then slows downs to stop. Making the same with bullet will require a lot of events...

    Pathfinding comes close to this, but it has its own issues - you need to find the path first, and sometimes the object does not stop precisely where it should.

  • Yeah, effects are slow on mobile. If you have lots of small sprites with effect, it's better to apply it to a layer.

  • You are doing the loop on every tick, this is wrong. Also, "Trigger once" doesn't work like this, it's also wrong.

    If you just want to count the number of instances, use Count and PickedCount expressions. For example:

    Product compare instance variable type="wool"
     -> Text set text "Total products: " & Product.Count & " wool: " & Product.PickedCount
    
  • every tick -> rotate 600*dt degrees toward (Touch.X, touch.Y)

    I tried this on a very old Android phone and I'm getting 60 pfs and 10-20% cpu utilization. So there must be something wrong with your project.

  • There must be a mistake in your code. I can't help you without seeing it, please post your capx or a screenshot of events.

  • I keep saying that MoveTo is not the same as tweening, but Ashely won't listen.. These two behaviors look similar, but serve different purposes.

    With tween you can't make an object to accelerate to max speed, move at constant speed for some time and then decelerate to zero and stop. Yes, you can use one of the "In-Out" functions or linear, but this will not be same.

    MoveTo can change direction and continue moving at the same speed to a new position. Tween can't do this.

    Tween can't be stopped by solids.

    With MoveTo you don't have to care about the time - you tell the sprite to move to a position and that's it, it will arrive when it will arrive. With tweening you need to calculate the duration, which depends on the distance, approximate speed and chosen function.

    The list goes on...

  • There are hundreds of useful expressions in C2, you can easily find them in that semi-transparent window that appears when you are editing event parameters:

    For example, instead of that huge formula, you can simply use distance() expression.

    Also, having different animation frames for each distance is not a very good solution. Here is a demo I made with a variable arrow size:

    dropbox.com/s/kbmvya5np2jzq68/ArrowOnTilemap.capx

  • You need to add up values from all instances?

    Set GlobalVar to 0
    System For each SpriteA -> Add (SpriteA.truk) to GlobalVar
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do something like this:

    On touch start -> Player find path to Touch.x, Touch.y
    
    Is in touch
    Every 0.3 seconds -> Player find path to Touch.x, Touch.y
    
    Player on path found -> Player move alone path
    
  • You do not have permission to view this post

  • It depends on how heavily this game template relies on LiteTween.

    You may be able to use Sine or some other behavior instead. Replace all events and actions, then delete the plugin.

  • Paster works pretty fast, you can update it on every tick.

  • It's a bug, I reported it here:

    github.com/Scirra/Construct-3-bugs/issues/2216

    Please comment on github if you have anything to add to my description.

  • Yeah, sometimes Construct is very restrictive and requires you to write a lot of repetitive events, like "If variable=1 Set tile state to Normal, else If variable=2 Set tile state to Flipped, else ...."

  • This is not possible without addons. You can try Paster:

    construct.net/forum/extending-construct-2/completed-addons-29/-plugin-paster-66240

    Rotate the square, paste it onto the Paster object, then resize the Paster.