CastMORay and CastObstacle Ray new argument
Author |
Message |
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: CastMORay and CastObstacle Ray new argument
Probably better to update and remodify behaviour anyway, so you can take advantage of all the other tuneups to their overall intelligence and behaviour. Now for something that's giving me grief. If anyone could help I'd greatly appreciate it. Attachment:
Sights.zip [1008 Bytes]
Downloaded 389 times
The laser sight script (based off the Darkstorm sights) is attached to a MOSRot that is emitted from an AEmitter attached to the gun. A little roundabout, but I think it cuts down on the number of things running on the gun itself, and it seems to be pretty lightweight. It also means I don't have to make a script for each gun with a laser, which cuts filesizes down just a tiny bit. The sniper scope script (Mehman's autoadjusting scope) is attached to the gun itself, and makes long-distance sniping easier since the sharpaim range adjusts very smoothly, rather than snapping back and forth. Currently, both of them are spamming ObstacleRay-based errors, since they're not correctly getting the wielder's team. Which I have no idea how to fix myself, unfortunately.
|
Mon Jun 04, 2012 5:15 pm |
|
|
Gotcha!
Joined: Tue Apr 01, 2008 4:49 pm Posts: 1972 Location: The Netherlands
|
Re: CastMORay and CastObstacle Ray new argument
Well, almost all should be fixed in UniTec, but I am hoping to get help with two things: Both the UniTec GL's sticky grenade ( unitec.rte\devices\lua\Sticky Grenade.lua) and UniTec Needler (basically CaveCricket's needler, only crappier, unitec.rte\devices\lua\needle.lua) stick to friendlies, while my logic tells me that they should not. I found a bunch of these: Code: SceneMan:CastMORay(self.parentgun.MuzzlePos,Vector(self.detectrange,0):RadRotate(self.parent:GetAimAngle(true)),self.parent.ID,0,false,4) and changed them to: Code: SceneMan:CastMORay(self.parentgun.MuzzlePos,Vector(self.detectrange,0):RadRotate(self.parent:GetAimAngle(true)),[color=#FF4000]self.Team[/color],self.parent.ID,0,false,4) They should ignore friends, not? Am I on the wrong track? Here's the mod so far: http://avatar.home.xs4all.nl/downloads/ ... _vtest.rarAny help would be gawdawful much appreciated.
|
Mon Jun 04, 2012 10:47 pm |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: CastMORay and CastObstacle Ray new argument
@Arcalane - change "self.team" to "self.Team" in line 9 of SniperScope.lua and that should fix it. And try Code: dist = SceneMan:CastObstacleRay(self.Pos, checkVect, strikePoint, lastPoint, baseUserID, self.Team, -1, 0); in place of line 21 in "LaserSightShort.lua". @Gotcha - Switch "self.Team" and "self.parent.ID" and that should work.
|
Mon Jun 04, 2012 11:12 pm |
|
|
Gotcha!
Joined: Tue Apr 01, 2008 4:49 pm Posts: 1972 Location: The Netherlands
|
Re: CastMORay and CastObstacle Ray new argument
CaveCricket, thank you so awful much. That did the trick!
I am going to name one of my future children after you. The handsome one. I can already hear mom calling out to the streets: "Cave Cricket! Come inside. It's dinner time!"
|
Mon Jun 04, 2012 11:41 pm |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: CastMORay and CastObstacle Ray new argument
Adjustable scope is working again, but the sights aren't projecting the dots. No errors in the console, but no dots either.
|
Tue Jun 05, 2012 4:10 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: CastMORay and CastObstacle Ray new argument
Oof, silly me. Line 8, change to: Code: local userID = SceneMan:CastMORay(self.Pos, checkVect, self.ID, -2, -1, false, 0); See if that works.
|
Tue Jun 05, 2012 4:54 am |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: CastMORay and CastObstacle Ray new argument
Nailed it! Much better. Now I can actually shoot straight again!
|
Tue Jun 05, 2012 5:02 am |
|
|
tfaal
Joined: Sat Apr 10, 2010 8:20 pm Posts: 19
|
Re: CastMORay and CastObstacle Ray new argument
Wait, if you're implementing a new argument for an existing method, why in heaven's name wouldn't you put in a default value?
|
Thu Jun 07, 2012 4:41 pm |
|
|
Daman
Joined: Fri Jan 26, 2007 3:22 am Posts: 1451
|
Re: CastMORay and CastObstacle Ray new argument
If any of you understand these functions and their arguments, could you add them to the wiki? I don't really mod for CC any longer. http://wiki.datarealms.com/index.php?ti ... &redlink=1http://wiki.datarealms.com/index.php?ti ... &redlink=1Anything you can put in those pages would be great! I can format it later!
|
Thu Jun 07, 2012 8:01 pm |
|
|
Shook
Joined: Fri Feb 16, 2007 8:43 pm Posts: 1695 Location: AH SHIT FUCK AUGH
|
Re: CastMORay and CastObstacle Ray new argument
A'ight, i've managed to wrestle the two into submission, so i've gone ahead and added something. I apologize in advance for the terrible formatting.
|
Fri Jun 08, 2012 9:49 pm |
|
|
|
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
|
|