Are you new? Sign up now
The Daily Click
Klik Coding Help
Lasers without scaling
19th June, 2012 at 6/19/2012 6:10:47 PM -
I'm making some lasers and I need them to stop getting longer when they hit an object.
This is easy with:
--> create laser at player action point
Repeat while Fire:
x Laser overlaps object
--> set x scale to x scale + 20
Laser overlaps object
--> set x scale to x left(object) - x(player action point)
but how would I do it without scaling? Since this is for the comp no scaling is allowed.
I was thinking of maybe creating a new laser active to the right of the previous one but this seems overly complicated.
There's also the loop method but I don't know how far we can push loops in this comp.
Any thoughts? Cheers!
Edited by SolarB
20th June, 2012 at 6/20/2012 1:07:46 AM -
Hi. I have a couple of examples on my website.
355 open source examples and games
20th June, 2012 at 6/20/2012 1:39:04 AM -
You've got more than a couple. You have over 300!
20th June, 2012 at 6/20/2012 2:10:54 AM -
Thanks Marv but I went through the site and the only two I see use scaling. Nevermind though, I found a quick and dirty way around it, check this out if you're interested:
Worth A Click