Data Realms Fan Forums
http://45.55.195.193/

Gibbing self before hitting target
http://45.55.195.193/viewtopic.php?f=73&t=21508
Page 1 of 1

Author:  Asklar [ Wed Feb 16, 2011 10:43 pm ]
Post subject:  Gibbing self before hitting target

I suppose this can be done casting rays, but I've never been good with those.
My guess for the code is like this:

Code:
function Update(self)
   local vel = Vector(self.Vel.X,self.Vel.Y):SetMagnitude(50);
   if SceneMan:CastStrengthRay(self.Pos,vel,1,nil,3,0,true) == true then
     self.GibThis();
   end
end


I based this one in a terrain-rape-reducer.

Author:  blargiefarg [ Thu Feb 17, 2011 3:13 am ]
Post subject:  Re: Gibbing self before hitting target

Do a check for the nearest actor that isn't on the same team as the user, and self.GibThis if it is true.

Author:  Asklar [ Thu Feb 17, 2011 4:19 am ]
Post subject:  Re: Gibbing self before hitting target

And how do I do that?
I have to do it with rays?
I'll try and come with results.

Author:  Asklar [ Thu Feb 17, 2011 5:02 am ]
Post subject:  Re: Gibbing self before hitting target

WooT! I did it!
I simply modified the Coalition homing missile launcher's Script.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/