Data Realms Fan Forums http://forums.datarealms.com/ |
|
[SOLVED] Easily Customized Laser Sight Range? http://forums.datarealms.com/viewtopic.php?f=73&t=31242 |
Page 2 of 2 |
Author: | Arcalane [ Sun Jun 17, 2012 8:57 pm ] |
Post subject: | 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. |
Author: | Arcalane [ Thu Jun 21, 2012 1:16 pm ] |
Post subject: | 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. Apparently I do, and apparently it is! This game is so weird sometimes. 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! |
Page 2 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |