I searched around a bit and noticed this has been asked before, but I didn't find any definitive answer to that: I want to make a laser beam that is shot towards another object and continues till it hits an obstacle.
First I tried the draw object (I remember messing around with it when I wanted to make a laser sight to a gun in a top down shooter), but I can't seem to make it work and there aren't any examples for that extension, or so it seems, also from the replies in some threads I've seen it doesn't seem to be like a popular choice for that issue.
Then I found this thread: http://www.create-games.com/forum_post.asp?id=200133
I downloaded the example in the 3rd post and it seems to work nicely, it's based on altering the scales and angle of an active object, but I can't manage to (1) make it stop at obstacles; (2) shoot in the angle of where the player is.
Any ideas?
I like the way a laser beam was done in FIG, I sent an email to the creator hoping to get some tips, no reply so far.
It won't be up forever so get it while it's hot. This technique does NOT make MMF a happy bunny unless run in HWA.
Edit 1:
Oh gosh how embarassing! I didnt actually read the last sentance in your post. You can do it without altering the scale, but not without altering the angle. Unless anyone wants to prove me wrong
Edit 2:
What is actually wrong with using the technique i used?
Thanks, it works like a charm and now it feels silly that I didn't manage to do it on my own, though I said I did try scaling. I'm new to fast loops so maybe I did something wrong earlier...
One thing bothers me though, I set the quality to 0 and set the X scale in every loop to X scale + 1 instead of 0.5, and still the line was too short in 50 loops, but if I tried making it more than 50 loops it became VERY processor intensive.
Even on your sample I was already around the 60%-100% CPU load (depending on the angle) with my Athlon 64 3500+, how do you manage to pull off entire rollercoaster tracks with it?
Edit: About my last sentence, I'm not sure what you're talking about...
In my game it's only the supports that are created in this way, the track is rendered with an entirely different technique. Plus, MMFs HWA works wonders.
If you haven't got the HWA beta yet, download it. It makes scaling and rotating effortless for MMF.
I was making a game and then tried it with HWA and it wouldn't work properly
But apart from that, yeah it's good
Anyway, I found the laserbeam.mfa example pretty good and I've been meaning to add a laser feature to my game, I was going to add it later but since this topic is still nice and fresh I'll ask this question now:
How to make an object position itself at the end of the laser? Like a little crosshair or something so that you know where the laser will go when you shoot it... I've seen it done before but I can't remember how :S.
I looked around the Clickteam forums and downloaded this HWA but I'm not sure what it means exactly, can someone elaborate?
Sorry, I've been out of the clicking loop for a while...
It won't be up forever so get it while it's hot. This technique does NOT make MMF a happy bunny unless run in HWA.
Edit 1:
Oh gosh how embarassing! I didnt actually read the last sentance in your post. You can do it without altering the scale, but not without altering the angle. Unless anyone wants to prove me wrong
Edit 2:
What is actually wrong with using the technique i used?
Awesome mfa. Could really help me with something I've been working on. I used and Active object for a mini gun. If (IF) I can figure this out this would totally solve my prob.
Edit: I guess not. What I need is one that isn't a 360, just one that goes to the right.
It won't be up forever so get it while it's hot. This technique does NOT make MMF a happy bunny unless run in HWA.
Edit 1:
Oh gosh how embarassing! I didnt actually read the last sentance in your post. You can do it without altering the scale, but not without altering the angle. Unless anyone wants to prove me wrong
Edit 2:
What is actually wrong with using the technique i used?
Awesome mfa. Could really help me with something I've been working on. I used and Active object for a mini gun. If (IF) I can figure this out this would totally solve my prob.