LittleStain's Forum Posts

  • 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

  • > 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..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Which part would you have difficulties with?

  • Is there a specific reason why you use physics behaviour for this and not bullet?

    Of you were to use bullet behaviour, I would just use rotate clockwise or counterclockwise, depeniding on up ot down pushed..

  • I'd put the lifebar objects in a container with the object, position an pin it and set it's width depending on an instance variable..

    Not sure what you mean by picking a pathfinding object type, though..

  • I guess you'd only have to change the moveto example shipped with construct a little bit to get the basics of this..

  • If you are trying a cross-domain request:

    (This is about Ajax, but I believe the same applies to "load from url")

    Making AJAX requests cross-domain or in preview

    By default, browsers block AJAX requests across domains. This means, for example, a game on scirra.com can request other pages on scirra.com, but cannot request pages on facebook.com. This is an important security feature of web browsers (it is not specific to Construct 2 or its AJAX object).

    Also, when previewing in Construct 2 the game runs on localhost. This counts as a different domain to the rest of the internet, so typically AJAX requests to any web page will fail during preview, unless the server explicitly allows cross-domain requests.

    If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

    Access-Control-Allow-Origin: *

    This will enable AJAX requests from any domain, but you should still be aware of the possible security implications of this. For more information on cross-domain requests see HTTP access control on MDN.

  • You do not have permission to view this post

  • second of all I don't even see how that would help.

    It would help with comparing the variables, which was your question, right?

    If the family doesn't have variables, there is nothing to compare..

  • What events/actions are you using for this?

  • Tutorial

    Another tutorial

    Did you know the tutorial section of this site has a search function?

    Some people try using it to find things..