Change attribute bug ?

SocksSocks London, UK.Member Posts: 12,822
edited May 2014 in Working with GS (Mac)

I'm having a problem . . .

I'm trying use interpolate to increase an actor's size - and when the actor reaches the target size I need to then change its size back to the starting size using change attribute . . . simple enough you'd think.

But I'm finding that I am not able to get a change attribute to change the actor's size after the interpolation (check out the video below) - I've tried all sorts of things, but I can't get it to work, it won't work the project I need it for, it also won't work in a brand new project - and I've tried it in 10.0.4 and 10.0.13 . . . no luck . . . but it works just fine in 0.9.0 !!

Sounds like a bug introduced in 10.0.4 - anyone else get the same issue when following the same procedure ?

«13

Comments

  • RondoRocketRondoRocket Member Posts: 411

    Not on my Mac at the moment so I can't test but have u tried tossing a timer in the rule? After 0.01 secs change size.

  • SocksSocks London, UK.Member Posts: 12,822

    @RondoRocket said:
    Not on my Mac at the moment so I can't test but have u tried tossing a timer in the rule? After 0.01 secs change size.

    Cheers for the input, I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

  • RondoRocketRondoRocket Member Posts: 411

    @Socks said:
    Cheers for the input, I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

    Oh... bummer. Well, I do believe I ran into that issue in my last game and just chalked it up to the hazards of working with interpolate. :| Sort of stinks if you need it to work exactly as shown in video.

  • BBEnkBBEnk Member Posts: 1,764

    I think it as something to do with timing if you put the change attribute in a timer and say after 0.01 seconds then change size to 100 it will work, or at least does in 11.1.2.

  • BBEnkBBEnk Member Posts: 1,764

    also you can change the rule itself to say when self time > then 2.02 seconds then change attribute width to 100 also works.
    I think the interpolate is running for a extra 0.02 seconds and causing the issue just like the animation behavior starts late.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @Socks, I got this to work by changing your rules ever so slightly.

    Update your rule to say When Self.Width ≥ 299 and it works as expected.

  • -Timo--Timo- Member Posts: 2,313

    I got the same.

    @jamie_c said:
    Update your rule to say When Self.Width ≥ 299 and it works as expected.

    doesn't work for me .

    like @RondoRocket‌ already said. add a timer.
    after 0 seconds change width to 100 also works

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
  • -Timo--Timo- Member Posts: 2,313

    @jamie_c the whole problem is in 'change attribute'. now you are using interpolate to change width back to 100. interpolate width to 100 in 0 seconds should also work instead of change attribute.

  • LumpAppsLumpApps Member Posts: 2,881
    edited May 2014

    Instead of change attribute use an interpolate attribute in 0 seconds. See attachement.

    Oops, attached it twice...

    edit: @jamie_c beat me to it ;) He also uses interpolate twice.

  • SocksSocks London, UK.Member Posts: 12,822

    ”Not on my Mac at the moment so I can't test but have u tried tossing a timer in the rule? After 0.01 secs change size“

    Cheers for the input, I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

    @BBEnk said:
    I think it as something to do with timing if you put the change attribute in a timer and say after 0.01 seconds then change size to 100 it will work, or at least does in 11.1.2.

    Cheers for the input, but like I said to RondoRocket I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @BBEnk said:
    also you can change the rule itself to say when self time > then 2.02 seconds then change attribute width to 100 also works.

    Placing the change attribute into a timer also didn't work, the rule just wouldn't fire for me, but even if it did unfortunately the way my project is set up I need it to work as shown in the video.

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    Socks, I got this to work by changing your rules ever so slightly.

    Update your rule to say When Self.Width ≥ 299 and it works as expected.

    I tried that too, no luck, even >150 won't work for me, cheers for your input anyhow.

  • SocksSocks London, UK.Member Posts: 12,822

    @timolapre1998 said:
    like @RondoRocket‌ already said. add a timer. after 0 seconds change width to 100 also works

    Cheers for the input, but like I have said to RondoRocket I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    weird. Here it is working fine:

    Thanks for taking the time to make the video, appreciated. The issue I am having is with change attribute, you are using interpolate rather than change attribute to return the actor to its starting size, interpolate works fine for me too, but change attribute doesn't seem to work.

  • SocksSocks London, UK.Member Posts: 12,822

    @timolapre1998 said:
    interpolate width to 100 in 0 seconds should also work instead of change attribute.

    Cheers for the input, but like I have said to RondoRocket I'm sure there are numerous workarounds, but unfortunately the way my project is set up I need it to work as shown in the video.

    :smile:

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @LumpApps said:
    Instead of change attribute use an interpolate attribute in 0 seconds. See attachement.

    Oops, attached it twice...

    edit: jamie_c beat me to it ;) He also uses interpolate twice.

    Cheers for your input, all help appreciated :)

    But as I've pointed out to everyone who has suggested a timer unfortunately the way my project is set up I need it to work as shown in the video.

  • SocksSocks London, UK.Member Posts: 12,822

    Does everyone agree that this is a bug rather than simply the way GS works ?

    Like I say you are able to achieve what I need to achieve in 0.9.0 with no problems, it just doesn't work from 10.0.4 onwards . . . . ?

  • LumpAppsLumpApps Member Posts: 2,881
    edited May 2014

    Have a good look. When I do it with change on my mac I see it change for a fraction of an eye blink and then interpolate leaks and takes its last step (again) to make it wide again. I'll try and make a slomo movie ;)

    Edit: so yes, seems like a bug to me. But I doubt it was never there before. I have tried to trigger things after an interpolate in some of my games many times but it never worked because it is not really solid.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @LumpApps said:
    Have a good look. When I do it with change on my mac I see it change for a fraction of an eye blink and then interpolate leaks and takes its last step (again) to make it wide

    I'm getting this same thing too, you can see a quick flash/change.

    @Socks, I'm sure it's no good, but if you use a Constrain Attribute to 100 instead of the Change that works too.... but still no luck with the Change Attribute either. :(

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    Have a good look. When I do it with change on my mac I see it change for a fraction of an eye blink and then interpolate leaks and takes its last step (again) to make it wide again.

    Yep, that's what I've been getting too.

    Edit: so yes, seems like a bug to me. But I doubt it was never there before.

    Like I say, the problem is only seen in 10.0.4 onwards, for example it works fine in 0.9.0.

  • LumpAppsLumpApps Member Posts: 2,881

    Slomo time ;)
    Look at the flash at 0:08543

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @jamie_c said:
    Socks, I'm sure it's no good, but if you use a Constrain Attribute to 100 instead of the Change that works too.... but still no luck with the Change Attribute either. :(

    Yes, I tried pretty much everything, there are a few workarounds, constrain worked for me too, but oddly using >299 wouldn't work, nor would a timer always work.

    At one stage I had a very simple set up . . . . .

    Interpolate width to 300 / duration 1 second

    Timer: after 1.5 seconds change attribute width to 100

    . . . and it still wouldn't fire the rule !?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I don't know if this is the final effect you want but I've got the box to grow/start over at 100/grow/... endlessly by doing this:

    Loop
    Until self.Size.Width=300
    Change Attribute: self.Size.Width to self.Size.Width+1
    
    Rule
    When self.Size.Width=300
    Change Attribute: self.Size.Width to 100
    

    The Second Change Attribute to 100 works fine in this case. So it seems to not work when paired with an Interpolate.

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    Slomo time ;)
    Look at the flash at 0:08543

    Yep, I think the Leaky Interpolate Hypothesis seems like it may well be right.

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    I don't know if this is the final effect you want but I've got the box to grow/start over at 100/grow/... endlessly by doing this:

    Loop
    Until self.Size.Width=300
    Change Attribute: self.Size.Width to self.Size.Width+1
    
    Rule
    When self.Size.Width=300
    Change Attribute: self.Size.Width to 100
    

    The Second Change Attribute to 100 works fine in this case. So it seems to not work when paired with an Interpolate.

    Cheers, yeah, that works, there are a couple workarounds I've got working, I just need to find something that fits in with how my project is set up . . . I might end up having to tear it apart and start again from the ground up.

  • LumpAppsLumpApps Member Posts: 2,881

    An other workaround would be using the self.time and an offset attribute. I believe that is taking less from the processor. It's like a custom timer.

  • SocksSocks London, UK.Member Posts: 12,822

    @LumpApps said:
    An other workaround would be using the self.time and an offset attribute. I believe that is taking less from the processor. It's like a custom timer.

    Yeah, the thing is I have a ton of these things so I wanted to make them as efficient as possible, I might even destroy them at 300 wide and spawn a new 100 wide version, might have to test out various ideas to see what is the least taxing on the processor.

  • LumpAppsLumpApps Member Posts: 2,881

    Here it is. The actor needs a touch to start growing

  • LumpAppsLumpApps Member Posts: 2,881
    edited May 2014

    @Socks said:
    Yeah, the thing is I have a ton of these things so I wanted to make them as efficient as possible,

    I don't think there is a more efficient way then this.

Sign In or Register to comment.