The Daily Click ::. Forums ::. Klik Coding Help ::. Lasers without scaling
 

Post Reply  Post Oekaki 
 

Posted By Message

SolarB



Registered
  26/12/2011
Points
  564
19th June, 2012 at 19/06/2012 18:10:47 -

I'm making some lasers and I need them to stop getting longer when they hit an object.

This is easy with:

Pressed Fire:
--> 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

 
My Open Source Examples: http://bit.ly/YyUFUh

nivram



Registered
  20/07/2006
Points
  171
20th June, 2012 at 20/06/2012 01:07:46 -

Hi. I have a couple of examples on my website.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
20th June, 2012 at 20/06/2012 01:39:04 -

You've got more than a couple. You have over 300!

 
n/a

SolarB



Registered
  26/12/2011
Points
  564
20th June, 2012 at 20/06/2012 02:10:54 -

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:

http://www.create-games.com/project.asp?view=news&id=2312&fid=5046

 
My Open Source Examples: http://bit.ly/YyUFUh
   

Post Reply



 



Advertisement

Worth A Click