View unanswered posts | View active topics It is currently Fri Dec 27, 2024 7:46 am



Reply to topic  [ 4 posts ] 
 Gibbing self before hitting target 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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.


Wed Feb 16, 2011 10:43 pm
Profile
User avatar

Joined: Mon Apr 05, 2010 8:04 am
Posts: 149
Location: Under your bed
Reply with quote
Post 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.


Thu Feb 17, 2011 3:13 am
Profile YIM
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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.


Thu Feb 17, 2011 4:19 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Gibbing self before hitting target
WooT! I did it!
I simply modified the Coalition homing missile launcher's Script.


Thu Feb 17, 2011 5:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

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.039s | 15 Queries | GZIP : Off ]