|
| 21 Jul 2011 10:09 AM |
| As you know, the Offset property is used to simulate the movement of the brick while the actual brick stays stationary. This reduces the lag. Crazyman32 told me that is how he moves his missiles. What I was wondering is if that is what he uses to simulate the movement, the actual brick could still trigger the touch event. How does he by pass that. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 21 Jul 2011 10:14 AM |
I think he's lying when he says he uses *just* the offset position. Now the mesh itself, that might be attached to a larger brick which is moving.
Again, it would be plain inefficient to have to check for collision yourself.
~Ozzy |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:16 AM |
| With complicated scripts. My guess is that he would find the position of the target, find how fast the missile is traveling, and do some math to figure out how long it would take to get there. Then he would put that into a wait() command then create an explosion at the position of the target. |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:17 AM |
@Ozzy What way would you suggest that I project a missile All the Body... are glitchy and sometimes cause the missile to explode it's own plane. That ain't cool. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 21 Jul 2011 10:21 AM |
BodyVelocities and BodyGyros aren't glitchy at all; you're just using them wrong.
I remember there was a RocketPropulsion object that made it easier to make a missile.
~Ozzy |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:22 AM |
@Ozzy There is absolutely no way to use BodyVelocity wrong. RocketPropulsion is long since broken. What BodyVelocity does is cause the missile to come back to the place it was shot from. THe plane by that time is already on that position. This causes the plane to go kaboom |
|
|
| Report Abuse |
|
|
| |
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 21 Jul 2011 10:25 AM |
| BUT I LIKED ROCKETPROPULSION! D: |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:43 AM |
So did I! But roblox messed it up :( Wouldn't it have been so easy to make a homing missile with RocketPropulsion? D: Well, now help me with projecting a missile please :( |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:44 AM |
o_O this is what I have so far:
function onFire(gun) local ray = Ray.new(gun.Position, gun.CFrame.lookVector * 999) local Part, Pos = Workspace:FindPartOnRay(ray, gun) local ra = Ray.new(Pos, gun.CFrame.lookVector * 350) local part, pos = Workspace:FindPartOnRay(ray, gun) local b = Instance.new("Part") b.Parent = game.Workspace b.Position = gun.Position:Lerp(pos, 0.05) b.formFactor = 0 b.Size = Vector3.new(1,.4,1) b.BrickColor = BrickColor.new(194) b.Name = "Rocket" b.Velocity = gun.CFrame.lookVector * 800 local force = Instance.new("BodyForce") force.force = Vector3.new(0, 196*b:GetMass(), 0) --anti-grav it force.Parent = b local bg = Instance.new("BodyGyro") bg.cframe = CFrame.new(b.Position, pos) bg.Parent = b local s = script.Parent.Rocket:Clone() s.Disabled = false s.Parent = b local M = script.Parent.Rockett:Clone() M.Parent = b local K = Instance.new("Smoke") K.Parent = b K.RiseVelocity = 10 local creator_tag = Instance.new("ObjectValue") creator_tag.Value = script.Parent.Parent.Parent creator_tag.Name = "creator" creator_tag.Parent = b end |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:49 AM |
| Oh yeah the anti-grav part was taken of the roblox FreezeRay. Help ozzypig :P |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 10:54 AM |
| Ozzypig? Are you there? Come on help please@! |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Jul 2011 11:12 AM |
| You could make it without any of those though. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
alexmach1
|
  |
| Joined: 02 May 2008 |
| Total Posts: 1977 |
|
|
| 21 Jul 2011 12:07 PM |
well, in place of rocket propulsion, you could use this script that does almost the exact same thing. just make sure the rocket is anchored, so it doesnt move down before the script activates.
script.Parent.Anchored=false while true do script.Parent.Velocity=script.Parent.CFrame.lookVector*50 wait() end |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 12:09 PM |
| Velocity does the same thing as BodyVelocity. It causes the missile to lag and crash into it's own plane. |
|
|
| Report Abuse |
|
|
alexmach1
|
  |
| Joined: 02 May 2008 |
| Total Posts: 1977 |
|
|
| 21 Jul 2011 12:12 PM |
actually, this script improves the missile with a much easier way to set its speed and direction. it also prevents dipping that was present in the previous script.
aka use this script in place of rocketpropulsion
local Factor = 196.2 local Gravity = Instance.new("BodyForce") Gravity.Parent = script.Parent Gravity.force = Vector3.new(0,Factor * script.Parent:GetMass(),0)
while true do script.Parent.Velocity=script.Parent.CFrame.lookVector*50 wait() script.Parent.Velocity=script.Parent.CFrame.lookVector*50 end |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 12:18 PM |
| City, use BodyForce to counter the mass of the missile, making it fly smoothly. Thus, making it so the missile doesn't lagg and make the plane go boom. |
|
|
| Report Abuse |
|
|
alexmach1
|
  |
| Joined: 02 May 2008 |
| Total Posts: 1977 |
|
|
| 21 Jul 2011 12:27 PM |
| @darkkiller you mean like the script above your post XD |
|
|
| Report Abuse |
|
|
|
| 21 Jul 2011 12:42 PM |
| So wait a sec, the while loop, can I use a different script for that? |
|
|
| Report Abuse |
|
|
| |
|
alexmach1
|
  |
| Joined: 02 May 2008 |
| Total Posts: 1977 |
|
| |
|