assign this to your dynamic objects
push_object.lua
--key used to push objects (or set to "" to autopush any nearby object)
local input_key = "b"
--how close the player needs to be to push
local push_range = 100
--how fast/far the object is moved
local speed = 120
function push_object_init_name(e,name)
weapon_name[e] = name
end
function push_object_main(e)
if GetPlayerDistance(e) <= push_range then
if input_key ~= "" then
PromptLocal(e,"Push " ..weapon_name[e].. "? *" ..input_key.. "*")
end
if GetInKey() == input_key or input_key == "" then
CollisionOff(e)
SetRotation(e,0,g_PlayerAngY,0)
MoveForward(e,speed)
SetRotation(e,0,0,0)
end
else
CollisionOn(e)
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11