dthxxx666 Posted October 14, 2018 Posted October 14, 2018 Hola a todos , Estaba poniendole fuego en las ruedas a una moto y tengo el siguiente problema : cuando cambio de vehiculo las dos llamas de cada una de las ruedas quedan donde estaba la moto , y no desaparecen Aparte de que las llamas tienen colisión lol Acá lo que he venido intentando: -----destruir fuego function firedelete() local attachedElements = getAttachedElements ( getPlayerOccupiedVehicle (getLocalPlayer()) ) --get all elements that are attached to the car for ElementKey, ElementValue in ipairs ( attachedElements ) do--loop through all attached elements... setElementCollisionsEnabled (ElementValue, false) -- ...and disable their collision end end addEventHandler ( "onVehicleExit", getRootElement(), firedelete ) Y Acá el codigo del fuego por si las dudas : ya no se ni donde iria si en otra funcion o dentro de esta ya probé todo local ccx,ccy,ccz,ccrx,ccry,ccrz= 0,1.6,0.1,0,0,0 ---fuego rueda adelante local cccx,cccy,cccz,cccrx,cccry,cccrz= 0,-1.0,-0.1,0,0,-90 ---fuego ruesda atras function vehiclefire(cmd) local veh = getPedOccupiedVehicle ( localPlayer ) firefront = createObject( 2021, 2,2,2) fireback = createObject( 2021, 2,2,2) attachElements ( firefront, veh, ccx,ccy,ccz,ccrx,ccry,ccrz) attachElements ( fireback, veh, cccx,cccy,cccz,cccrx,cccry,cccrz) if end end addCommandHandler("fire", vehiclefire)
dthxxx666 Posted October 14, 2018 Author Posted October 14, 2018 Bueno ya lo solucioné era una estupidez , solo tenia que cambiar la id del objeto por otro objeto sin colisión en el particle objects ahora me averguenza haber hecho este post no pude eliminarlo lol xDD
aka Blue Posted October 14, 2018 Posted October 14, 2018 (edited) SetElementCollisionsEnabled también era una solución. Edited October 14, 2018 by aka Blue 1
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