a little question about interpolate.

i have a actor that the x position is 1030, so i have a rule, when x position=1030 to interpolate position x to 2050, ,but for some reason when the game starts the x-position is like 800 and then interpolates to 2050 but i need my actor to start moving from 1030.

Comments

  • ChakkuChakku Member Posts: 1,513
    @guilleface

    Use a Change Attribute behavior to move the actor to where you want it to be. Then drag the interpolate behavior under it; as GameSalad reads behaviors from top to bottom, it should load your Change Attribute behavior before the Interpolate behavior.

    Sometimes I find that doesen't always work. If that's the case, then still use the Change Attribute behavior to change its position, then do a Timer- After 0.000001 seconds Interpolate.

    Hope this helps
    Chakku
  • guillefaceguilleface Member Posts: 1,014
    thanks, i did add a change attribute to 1030 which the actor is already at that position, and didnt work but is working now with the timer you say, thanks very much, i just dont understand why the actor moves back to like at 800.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    if the actor is moving from the position you placed it in the scene you have a rule somewhere that is changing it. Its best to find that bug in your code vs adding addition logic to workaround your own bugs. your end result will have a better perfuming game. You might check and make sure you don't have the actor unlock in the scene and different rules in there.

    I would never suggest to anyone they work around a bug that should be able to be fixed.
  • guillefaceguilleface Member Posts: 1,014
    you right thats why its weird, i double checked.i only have my rule like this, when attribute x-position=1030 and y position=678 to interpolate x-position to 2050, but my actor start moving from x-position like 800 but if i i put this rules inside after .1 second then the actor starts moving from x=1030.
Sign In or Register to comment.