View unanswered posts | View active topics It is currently Tue Aug 21, 2018 8:42 am



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

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Easily Customized Laser Sight Range?
Oh heavenly ♥♥♥♥ of granite, I UPLOADED THE WRONG VERSION. Fixed it now, many apologies for the inconvenience. Use it or not, it's there now. I can't figure out how to make it inherit the holders team for the life of me, since it refuses to acknowledge self.RootID as anything, and self.Team doesn't produce any results. I'll keep dicking around with it, but it's possible that i'll just call it quits before i complicate things even further (and look like an incompetent ♥♥♥♥ in the process).


Sun Jun 17, 2012 8:31 pm
Profile WWW
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1608
Location: UK
Reply with quote
Post Re: Easily Customized Laser Sight Range?
:lol:

It flat out ain't doin' a thing for me now. No dot, no errors, nothin'. :???:


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

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Easily Customized Laser Sight Range?
That's likely because you're missing the Tracer Particle in your INI's. It doesn't produce any errors if it's missing, it just does diddly squat. I tested it myself this time, and i'm decently sure that's the problem, since it did produce that tiny red dot when i tried. Otherwise, lend me a shovel so i can go bury myself.


Sun Jun 17, 2012 8:52 pm
Profile WWW
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1608
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: 1608
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   [ 20 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.015s | 15 Queries | GZIP : Off ]