Data Realms Fan Forums http://45.55.195.193/ |
|
Just a Couple Questions http://45.55.195.193/viewtopic.php?f=73&t=17548 |
Page 1 of 1 |
Author: | ZevN47 [ Sun Jan 10, 2010 4:39 pm ] |
Post subject: | Just a Couple Questions |
I'm making a homing missile based off of TLB's homing missile code but I don't know how to get it to go after an AEmitter called "targetx" can someone help me out? Also I'm trying to make an actor have a dash function instead of a jet pack so when you sharp-aim and dash then you go in that direction. I don't want him to teleport I just want him to fly in the direction he is aiming for like 2 sec. I made a ini version but he got smashed into walls and it sucked. I know trig but can someone tell me how(or make code) to make him dash? |
Author: | CaveCricket48 [ Sun Jan 10, 2010 5:33 pm ] |
Post subject: | Re: Just a Couple Questions |
This is for the missile: Code: function Update(self) if not(MovableMan:IsParticle(self.target)) then for emitter in MovableMan.Particles do if particle.ClassName == "AEmitter" and particle.PresetName == "targetx" then self.target = emitter; end end elseif MovableMan:IsParticle(self.target) then self.RotAngle = SceneMan:ShortestDistance(self.Pos,emitter.Pos,SceneMan.SceneWrapsX).AbsRadAngle; self:EnableEmission(true); end end Includes finding the emitter, setting it to "self.target", orientating itself to point towards self.target, and enabling its emission (assuming the missile is an emitter). |
Author: | ZevN47 [ Mon Jan 11, 2010 1:35 am ] |
Post subject: | Re: Just a Couple Questions |
ahhhh ok I wasn't doing the class name right so that's why it wasn't working Thanks bunches!!! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |