Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 10 Aug 2011 07:59 PM |
| I'm making a gunship, and armed on the side are 6 gas canisters. the canisters sit above on top of the wing, and when the pilot presses a key, the canister pops out and a cloud of toxic gas comes out, but the canister just sits on the wing. I have a delay for it, like after 5 seconds upon shooting, the cloud pops out. but I wanted it to have a velocity in it so the canister shoots out, instead of staying on the wing. How do I make the canister have a velocity for a short time? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 08:17 PM |
Instance.new("BodyVelocity")
or just break the joints/weld and let roblox gravity do it's job... |
|
|
| Report Abuse |
|
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
| |
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 10 Aug 2011 08:27 PM |
| It didn't work. It went to the left, and if I were to shoot it when I pointed at something, it would go a different way.. Is there a way to make it fly in the direction it's pointing? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 08:30 PM |
Look at BodyVelocity's properties and adjust it's settings to make it go different directions, speeds, etc.
You can use the object browser under Help-->ObectBrowser to view it's properties. |
|
|
| Report Abuse |
|
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 10 Aug 2011 08:44 PM |
What setting is it?
I see
P
maxForce
velocity
if I edit velocity, it only goes one way. I don't know what the others do. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 08:52 PM |
P stands for Power maxForce is the amount of power applied to a certain direction
veloctiy is what you want, I think...
if the veloctiy is (0, 1, 0) the brick will go up slowly if the velocity is (0, 10, 0) the brick will go up faster if the velocity is (1, 0, 0) the brick will slowly go to the right if the velocity is (-1, 0, 0) the brck will slowly go to the left if the velocity is (1, 1, 0) the brick will slowly go diagonally up and to the right
just play around with the properties... |
|
|
| Report Abuse |
|
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 10 Aug 2011 08:54 PM |
| What about forward? all I wanted was the brick to go forward, from any position the plane is in, fall and deploy. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 09:02 PM |
Okay, well I'm not sure exactly how your plane is build but just play around with this:
BV = Instance.new("BodyVelocity") S = Instance.new("Smoke")
function here() BV.Parent = game.Workspace.ShipModel.Brick BV.velocity(x, 0, x) --play around with these numbers to make it go different directions.. keep the middle one 0, that's up and down... wait(2) BV:remove() -- waits 2 seconds and then removes the force wait(5) S.Parent = game.Workspace.ShipModel.Brick -- waits 5 seconds and the smoke will be released connectionlinehere:connect(here)
I also assume you have a function for this to go in?
I hope you get it to work... It sounds cool :P |
|
|
| Report Abuse |
|
|
Darkcheez
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 157 |
|
|
| 10 Aug 2011 09:15 PM |
Mathman, I think you're missing the point.
Anyhow, is the grenade mounted on the wing? 'Cause if it is, then it would have to rocket the direction it's currently pointing.
(this is where some scripting genius butts in and gives him an answer) |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2011 09:24 PM |
Are you suggesting that I don't know how to script?
I'm sorry that I don't know how he wants it... |
|
|
| Report Abuse |
|
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 11 Aug 2011 01:09 PM |
| @Dark Yes that's how it is. it's mounted to a wing, and all I wanted so whatever direction the plane was pointing it would shoot that way. |
|
|
| Report Abuse |
|
|
huner2
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 1681 |
|
| |
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 11 Aug 2011 01:31 PM |
I tried that D:
It didn't work. :/ |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2011 01:50 PM |
Weld the wings, and just joint the canisters. When the user presses the key, break the joints. The wing stays together because it's welded, but the canisters aren't, so inertia takes care of the rest.
(And gravity. I like gravity ._.) |
|
|
| Report Abuse |
|
|
Tony1346
|
  |
| Joined: 04 Oct 2008 |
| Total Posts: 223 |
|
|
| 11 Aug 2011 01:59 PM |
| Could you add the velocity and such to make it a rocket to the script? |
|
|
| Report Abuse |
|
|