Hello, im working on something for my friends server, we were trying to make our Vehicles Blow up when hit and i was doing ok with the FX, Explosion Damage n Sound, etc untill i get to the point of making the Script calculate the position of the Car that's exploding to make it jump into the air.
I already used the Gmod Wiki but it gave us no examples about how to use most of the lua codes and i would really appreciate any wise person who wants to help me with this :)
-- I wanted to make this so the vehicle that's being blown up ignites players and stuff around him (actually just ignites itself) and make it fly into the air, i used SetVelocity, but i can't get it to work properly, i guess i need to hook the vehicle to the SetVelocity somehow, but i can't find the answer :$
This is the part of the code im stuck right now:
[CODE]
local explosion = ents.Create( "env_explosion" )
explosion:SetPos( car:GetPos( ) )
explosion:Spawn( )
explosion:Fire( "explode", "", 0 )
vehicle:Ignite( 15, 330 )
vehicle:SetVelocity (Vector (0, 0, 1000))[/CODE]
Any lua veterans? :)
[code]vehicle:GetPhysicsObject():SetVelocity( Vector( 0, 0, 1000 ) )[/code]
SetVelocity doesn't work on entities unless it's a player.
[QUOTE=Joeyl10;46602940][code]vehicle:GetPhysicsObject():SetVelocity( Vector( 0, 0, 1000 ) )[/code]
SetVelocity doesn't work on entities unless it's a player.[/QUOTE]
oooh, i feel so dumb! thanks you Joey! :D
Sorry, you need to Log In to post a reply to this thread.