The Daily Click ::. Forums ::. Klik Coding Help ::. Platform Laserbeam
 

Post Reply  Post Oekaki 
 

Posted By Message

eyeangle



Registered
  12/06/2003
Points
  1683
20th October, 2007 at 04:09:06 -

I'm trying to have my platform guy shoot a laserbeam and it is a constant flow from his gun to the end of the screen, or if it hits a wall, as soon as you press shoot. Everything in it's path blows up or dies. The laser is a constant flow from the time you press [Ctrl] to the time you release.

I know this is going to be quite tricky to do and if anyone wants to help out you'll be credited. I think i'll have to use fast loops and heaps of small active object but im not too sure.

So yeah that's the deal, please help.

 
theonecardgame.com

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th October, 2007 at 15:45:40 -

assume you have mmf2;

http://www.angelfire.com/mech/banshee/Laser.mfa
(you may need to copy & paste the link)

it's not perfect. i did improve it, but i can't find the new version anymore.

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
20th October, 2007 at 16:03:13 -

You can either
A: Use fastloop + advanced math object, and a heap of small objects that only exist for a single frame
or
B: Use the Drawline extensions


*collisions are very difficult with drawline, but if you want to keep your AO's down from it, heres what you can do*
Use drawline to draw the graphical effect, and use a single active object in a fastloop as a detector; have it go the exact path the drawline will go through.

Bear in mind, drawline is also fairly buggy in that it will often not clear the background properly, and leave little bits of itself. Overlay is another possibility, depending on what kind of game you are doing. Generally, if you overall active object count is low, its worth it just to use a stream of AO's instead of drawing lines.

Image Edited by the Author.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
20th October, 2007 at 17:09:28 -

Never use drawline.

It's an incomplete extension.

 
My signature is never too big!!!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
20th October, 2007 at 19:10:03 -

the only time I saw it used heavily and awesomely was when that who had the Carnage avatar made a Spiderman Demo. Just checked, and damn the DL isn't valid anymore and Mavel Hero dropped off the face of the planet 30k hours ago.

But yeah, pasting bugs abound.

 
Craps, I'm an old man!

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
20th October, 2007 at 21:23:12 -

Aside from the pasting bugs its works completely fine, afaik.
However, it WILL create excessive crap on your background. Overlay is the only choice if ur using MMF2.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

eyeangle



Registered
  12/06/2003
Points
  1683
22nd October, 2007 at 00:30:28 -

Thanks sketchy, works a treat. It's just sometimes the laser goes through the squares for a split second, only sometimes, but I dont know if this can be helped, can it?

Image Edited by the Author.

 
theonecardgame.com
   

Post Reply



 



Advertisement

Worth A Click