TheSmart Posted July 27, 2015 Posted July 27, 2015 hey guys! i was trying to attach fire on rock but idk why it not working function fireRocks () rock = createObject (3930, -2588.91, 83.9, 4.48, 90, 0, 0 ) name = createFire ( x, y, z, 2) attachElements ( name, rock, 0, 0, 2 ) end addCommandHandler("fire", fireRocks) that error i got -,- http://prntscr.com/7xh2fn
HUNGRY:3 Posted July 27, 2015 Posted July 27, 2015 function fireRocks () rock = createObject (3930, -2588.91, 83.9, 4.48, 90, 0, 0 ) name = createFire ( 0, 0, 0, 2) attachElements ( name, rock, 0, 0, 2 ) end addCommandHandler("fire", fireRocks)
KariiiM Posted July 27, 2015 Posted July 27, 2015 Make sure that the script is client side in meta. Yeah,because createFire is client sided.
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 i know it now getting that error http://prntscr.com/7xi02c
KariiiM Posted July 27, 2015 Posted July 27, 2015 Write it here ,because the link doesn't works for me
HUNGRY:3 Posted July 27, 2015 Posted July 27, 2015 wiki:This is not compatible with all elements. The following elements are compatible: Markers Blips Objects Players Vehicles Sounds Colshapes Cameras Weapons
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 ohh didn't see well i want like that my friend say that : is meteor / meteor and the stone falls yes, simbe objects don't have gravity, so i attached the meteor objects to a small, invisible vehicle, so they can fall down The stones are created with the createObject function. You can find the correct stone ids in the map editor anyone explain me how to do that?
KariiiM Posted July 27, 2015 Posted July 27, 2015 To do like what is in the picture, you've to attach an weapon named "Molotov Cocktails" in that object ! Molotov ID =18
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 thnx it work now but how i can set fire forever?
KariiiM Posted July 27, 2015 Posted July 27, 2015 Use, setTimer Do an unlimited number, like 999999..
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 doesn't work function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( fire, 99999999, 1) end addCommandHandler ( "fire", fireRocks ) that error i got http://prntscr.com/7xj0ry
KariiiM Posted July 27, 2015 Posted July 27, 2015 Try now function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( fire, 99999999, 1,true) end addCommandHandler ( "fire", fireRocks )
KariiiM Posted July 27, 2015 Posted July 27, 2015 doesn't work still getting same error So put the error here
LaCosTa Posted July 27, 2015 Posted July 27, 2015 function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 99999999, 1,fire) end addCommandHandler ( "fire", fireRocks )
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 error remove but fire doesn't stay forever D:
KariiiM Posted July 27, 2015 Posted July 27, 2015 function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 99999999, 1,fire) end addCommandHandler ( "fire", fireRocks ) It won't works,you just added createFire in the setTimer, and createFire is already added with a difinition "fire", no need to do it two more time
Lawliet Posted July 27, 2015 Posted July 27, 2015 function fireRocks() local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) wX,wY,wZ = getElementPosition(weapon) local fire = createFire ( wX,wY,wZ, 2) attachElements(rock,weapon,0,0,2) setTimer(function() if fire then createFire(wX,wY,wZ,2) end end, 120000,0) end addCommandHandler ( "fire", fireRocks ) This will create your desired fire at the coordinates -2815.18, 470.16, 4.86. The fire will be "reignited" every 2 minutes.
LaCosTa Posted July 27, 2015 Posted July 27, 2015 This will let it forever function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 99999999, 0,fire) end addCommandHandler ( "fire", fireRocks )
TheSmart Posted July 27, 2015 Author Posted July 27, 2015 This will let it forever function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 99999999, 0,fire) end addCommandHandler ( "fire", fireRocks ) nope its gone
HUNGRY:3 Posted July 27, 2015 Posted July 27, 2015 try this function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 1000, 0,fire) end addCommandHandler ( "fire", fireRocks )
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