LittleStain's Recent Forum Activity

  • replace that condition with the "on timer" condition..

    so remove the condition "time = 2 seconds" add the condition "on timer"

  • You could do this easily with the timer behaviour..

    Just create a sprite called "timer", which we'll use for for project-wide timing and give it the timer behaviour..

    on start of layout we'll set the timer for 2 seconds..

    Replace the time = 2 seconds with an on timer event..

    you can restart the timer either in the event itself or in the event that destroys the rock and blockade..

  • I'm not sure if you can directly use the name of the file, but if you can't you can request it with ajax and use ajax.lastdata..

    for more information have a look at the manual for ajax and project-files..

  • Would system every 2 seconds work for this?

  • If I had any idea what you want it would be easier..

    What do you mean when you say:

    "a transition or distortion on the layout or weapon. "

  • Unable to use "On start of layout" as it's triggered by other events.

    Tried the trigger once but still doesn't break out of looP.

    Will try trigger once and sub event now.

    Well... if it is triggered by other events, shouldn't it be a sub-event of that triggered event?

    The loop shouldn't be run every tick, only when certain conditions are met it should run once..

    right now the "trigger once when true" has no further conditions, so it is triggered once per tick

  • so you'd like this?

    system for "" from 0 to 4

    create object typeshow at (loopindex*80,300)

    typeshow set animationframe = loopindex

  • The origin is the position from which all caculations regarding the object are done..

    Scaling, rotating,movement..

    Even if the image representing your object is not even near the origin, Construct will see the origin as the position your object is and all actions regarding the object will take this as a starting point..

    If you want your object to scale from and to the center by actions, the origin should be at the center of your object..

    If for any other actions (rotation,movement) the origin should be somewhere else, using a "dummy" sprite to pin to, as described above would be a fairly simple working solution..

  • Using the search function with the words "lerp explanation" this is one one of the posts I found..

    You can try the search function yourself and find even more..

    Lerp is a very simple function

    Lerp stands for Linear intERPolation

    This function need 3 numbers parameter

    lerp(a,b,t)

    a and b are whatever number you want

    but t goes from 0 to 1 (well it can go under and over but... let's keep things simple)

    lerp(a,b,0) returns a

    learp(a,b,1) returns b

    the values in between 0 and 1 returns a number X between a and b such as X-a = (b-a)*t

    so t describe more or less where you are in between a and b

    lerp(a,b,0.5) return the middle so a+(b-a)/2

    lerp(0,10,0) = 0

    lerp(0,10,1) = 10

    lerp(0,10,0.5) = 5

    the way newt use it with

    sprite set X to lerp(self.X,destination,0.5*dt)[/code:y7rtf1sp] is a little trick
    the .X you have in the lerp is the .X you change in the expression
    and 0.5*dt is always more or less the same (depending on fps)
    
    so from step to step in the movement, destination-self.X will be shorter and shorter, so the lerp(self.X,destination,0.5*dt) will continue to move the sprite but slower and slower (ease out)
    
    In short the only issue with this technique is that the sprite will takes time to exactly get to destination. Mathematically it should never arrive but thanks to float rounding stuff it will.
    Anyway you should not rely too much on
    if sprite.X = destination
    
    that's all 
    
  • Someone made you a formula1 racing car (for free) and now you want him to take out the perfectly tuned engine, because the car is too heavy when you push it and you don't understand how to turn the key..

  • I saw the video and as far as I can see, there is no need for physics behaviour, that is why I asked..

    In Construct2 the bullet-behaviour and the platform behaviour also have gravity, but you said you set the gravity to 0 in your game, so even gravity wouldn't be a reason for the physics behaviour..

    A simple bullet- behaviour should work just fine in my opinion..

    Rotate 1 degrees counter-clockwise when pushing up

    Rotate 1 degrees clockwise when pushing down

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > You could use pathfinding instead of moveto?

    >

    tried that but he kept walking in a circle for 3-6 sec before moving to mouse x, y

    It should work fine if you use the correct events/actions..

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies