XxCozzaxX Posted April 6, 2010 Posted April 6, 2010 Help me ? I have red barrels - and i want to drop them from my vehicle - I can make this work... except the objects dont move... When you place a red barrel, to make it move you have to push it, right? How do i make it so that if i create a red barrel, it drops by itself instead of needing to be "pushed"?
dzek (varez) Posted April 7, 2010 Posted April 7, 2010 setElementVelocity but im not sure if this work on objects ..
DakiLLa Posted April 7, 2010 Posted April 7, 2010 setElementVelocity doesnt work with objects, but you can do a little trick: create any vehicle (for example, flower pot, ID 594) set its alpha to zero, set it to be damage proof and then attach your object to it. Then you just should to apply setElementVelocity on your vehicle. local pot = createVehicle( 594, 0, 0, 0 ) setElementAlpha( pot, 0 ) setVehicleDamageProof( pot, true ) local object = createObject( 1582, 0, 0, 0 ) attachElements( object, pot ) setElementVelocity( pot, 0, 0, 1.5 ) -- lets throw our object in air
XxCozzaxX Posted April 7, 2010 Author Posted April 7, 2010 Thats awesome, thanks, but now i have 1 problem - the objects are respawning after they blow up. Do i set a timer and destroy the element?
XxCozzaxX Posted April 7, 2010 Author Posted April 7, 2010 Thats awesome, thanks, but now i have 1 problem - the objects are respawning after they blow up.Do i set a timer and destroy the element? No worries - i've done it setTimer ( destroyElement, 6000, 1, pot ) setTimer ( destroyElement, 6000, 1, redbarrelobject )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now