Look at the Shadow casting behavior, it was made for that.
You can set it up a bit different so it will take exactly 0.3 seconds to transition. Then you also could use qarp() or cubic() for a non-linear transition.
Here are some ideas:
ease in:
qarp(0, 130,130, self.t)
ease out:
qarp(0, 0,130, self.t)
Overshoot and fall back:
qarp(0, 200,130, self.t)
It's discussed elsewhere but and expression to get the scale can be ambiguous if the width or height is changed to have a different aspect ratio. Like tall and skinny or short and wide.
If you're just setting the size with set scale and want to get it later and easy way would be to save the scale you set to a instance variable.
It might be enough to just check if the center of the star is in the polygon.
I made a capx a while ago that did that.
From what I've read we might get that in Construct 3. Maybe. But that's a long way's out and as stated by Ashley in the Latest Podcast and elsewhere on the forums C3 is just a vague idea at this stage. All development is dedicated to C2 currently.
It causes that error because of how picking works. The correct way to reference newly created sprites is:
System.CreateByName("Sprite", 1, 500, 200) SOL.Sprite[0].SetX(10)[/code:1wskp8k4] The relevant bit of the error is IndexError which basically means it can't access anything at that index. The reason? CC doesn't add the newly created objects to the object list until the next toplevel event. C2's picking of new objects is much the same. If you want to go the python route try:
corlenbelspar
Thanks. Here's an updated runtime.js to replace in the paster plugin folder that works with r189.
https://dl.dropboxusercontent.com/u/542 ... runtime.js
I'm not going to update the c2addon on the first post until the next stable release since this is a breaking change that will make the plugin not work for any release prior to 189.
Cheers.
Level 5 -> sprite16 -> remove the 'floors' private variable to fix it.
Edit: You can re-add it and it should work.
Edit2: For a technical note it would seem the variable index is 0, and it should be 1 to not crash? Craziness.
Aphrodite
Layer pasting would be nice to have, i just need to set aide some time to do some coding.
zenox98
Not really an oversight. i think if i didn't make the canvas plugin scirra may have made their own already. I probably just beat them to it.
There's a mode7 effect you can find by searching the forums.
Would checking if the enemywas left or right of the player and set the angle accordingly work?
Develop games in your browser. Powerful, performant & highly capable.
The 48.8 factor is due to some unit conversions.
Member since 15 Jun, 2009