Change attribute bug ?
Socks
London, UK.Member Posts: 12,822
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 ?
Comments
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.
Twitter:rondorocket
Web: rondorocket.com
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.
Twitter:rondorocket
Web: rondorocket.com
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.
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.
@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.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I got the same.
doesn't work for me .
like @RondoRocket already said. add a timer.
after 0 seconds change width to 100 also works
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
@timolapre1998, weird. Here it is working fine:
My version of GS is 0.11.0.13
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@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.
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
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.
Lump Apps and My Assets
”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.
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.
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.
I tried that too, no luck, even >150 won't work for me, cheers for your input anyhow.
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.
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.
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.
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.
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 . . . . ?
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.
Lump Apps and My Assets
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.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Yep, that's what I've been getting too.
Like I say, the problem is only seen in 10.0.4 onwards, for example it works fine in 0.9.0.
Slomo time
Look at the flash at 0:08543
Lump Apps and My Assets
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 !?
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:
The Second Change Attribute to 100 works fine in this case. So it seems to not work when paired with an Interpolate.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Yep, I think the Leaky Interpolate Hypothesis seems like it may well be right.
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.
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.
Lump Apps and My Assets
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.
Here it is. The actor needs a touch to start growing
Lump Apps and My Assets
I don't think there is a more efficient way then this.
Lump Apps and My Assets