View unanswered posts | View active topics It is currently Thu Dec 26, 2024 3:53 am



Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
 [SOLVED] Easily Customized Laser Sight Range? 
Author Message
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Easily Customized Laser Sight Range?
Nope, I'm sure I changed it to the correct particle, and on top of that... I have no 'Tracer Particle' MOPixel defined anywhere in any of my mods. If I hadn't changed the reference in the script, the console would be flipping out about how it can't find the MOPixel it wants.


Sun Jun 17, 2012 8:57 pm
Profile YIM
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Easily Customized Laser Sight Range?
So, I decided to go hack-crazy on the hack. I figured out a quick trick;

I reduced the system to a single AEmitter and a single MOSRotating, with one MOPixel dot per colour. The AEmitter is set to not normally emit any particles... this is where the fun comes in. I re-AddEmission the MOSRotating to the AEmitter when it's attached to the gun, and set the EmittedParticle's Sharpness and Mass values at the same time. I draw the range in pixels from the sharpness, and the colour from the mass (0.1 = red, 0.2 = blue, and so on), since the MOSRotating doesn't hit/get hit by MOs, and has a lifetime of essentially 1 frame, tops.

I have, however, run into something of a snag. I added a bunch of debug print checks to see if the script was running all the way through, which it is. Problem is, regardless of how I define the MOSRotating's Sharpness and Mass values in the AddEmission part, they always return 0 if told to print their current value in the script, or 1 if I don't define the Sharpness in the default MOSRotating that everything else copies from. :???: If I set the Sharpness to, say, 1000 in the original, then it's all fine... and it's constantly defaulting the colour instead of correctly determining it from the Mass.

Do I need to give the MOSRotating a new PresetName as part of the CopyOf or something? Is this one of CC's weird bugs?

Apparently I do, and apparently it is! This game is so weird sometimes. :roll:

Now I just need to resolve colour properly...

Cortex Command, why are you so bizarre sometimes? I can't get the laser colour from the exact mass - it defaults to red?! - but it works fine if I determine if it's in a range between <x> and <y> - ex, mass is 2, between 1.9 and 2.1. Then it fetches the colour just fine. :???:

Oh well. Done with this, at last!


Thu Jun 21, 2012 1:16 pm
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.061s | 14 Queries | GZIP : Off ]