Quote: "Scripts are not optional and they have never said they were, you have to have scripts. They give you all the scripts you need for a basic game, not knowing LUA code doesn't stop you from making a game, it just stops you from doing more complicated things, if you want to do more complicated things you need to learn to script.
The forum is here for you to get some help with that, not for people to do it for you.
It wasn't really so much that you were asking for scripts, it was your comment about already paying enough fees for GameGuru that got me, what that says to me between the lines is that you don't appreciate the time and effort that the community has put into making models and creating scripts, but you still want us to give them to you, that's a bit rude in my opinion. "
well said
@kcan i recommend at least trying to script, it's very rewarding and much less frustrating in the long run as you will be much less reliant on others.
your current attitude will not get you much help.
@wermer i found a few issues with your code so i have improved it, hope you don't mind
it now correctly checks for the release of 'e' to drop an item and most importantly will only pick the closest object to you so you can't carry more than one item anymore.
local nearest = nil
local nearest_dist = 80
local int_nearest_dist = nearest_dist
local cmode = 0
local new_y = 0
local prop_x = 0
local prop_z = 0
function carry_object_init(e)
cmode = 0
end
function carry_object_main(e)
if cmode == 0 then
if nearest == nil then
nearest_dist = int_nearest_dist
elseif GetPlayerDistance(nearest) > nearest_dist then
nearest_dist = int_nearest_dist
end
if GetPlayerDistance(e) < nearest_dist then
nearest_dist = GetPlayerDistance(e)
nearest = e
end
if (GetPlayerDistance(e) <= nearest_dist) then
Prompt("Press E to carry")
if g_KeyPressE == 1 then
cmode = 1
nearest = e
return
end
end
elseif (cmode == 1) then
new_y = math.rad(g_PlayerAngY)
prop_x = g_PlayerPosX + (math.sin(new_y) * 70)
prop_z = g_PlayerPosZ + (math.cos(new_y) * 70)
CollisionOff(nearest)
SetPosition(nearest , prop_x, g_PlayerPosY , prop_z)
RotateToCamera(nearest)
CollisionOn(nearest)
Prompt("Release E to drop")
if g_KeyPressE == 0 or GetPlayerDistance(nearest) > init_nearest_dist then
cmode = 0
CollisionOff(nearest)
SetPosition(nearest , prop_x , g_PlayerPosY , prop_z)
CollisionOn(nearest)
nearest = int_nearest_dist
nearest = nil
end
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11