You maybe know the weapon floating script from FPSC Classic. Now you can have this in GameGuru too.
Script:
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
-- Player Collects Weapon which float
function weaponquake_init_name(e,name)
weapon_name[e] = name
StartTimer(e)
end
local moveSpeedUp = 20 --Speed for move on y-axis
local rotateSpeed = 20 --Speed for rotation
local timeToFloatUp = 1000 -- Time to fly up
local timeToFloatDown = 2 -- Multiply how much of the moveUp time is used to fly down(
function weaponquake_main(e)
if n ~= 1 then
CollisionOff(e)
GravityOff(e)
n=1
end
RotateY(e,rotateSpeed) --Higher number increase rotate speed
if GetTimer(e) < timeToFloatUp then
MoveUp(e,moveSpeedUp) --Higher number increase move up speed
end
if GetTimer(e) >= timeToFloatUp and GetTimer(e) < timeToFloatUp*timeToFloatDown then
MoveUp(e,-moveSpeedUp) --Higher number increase move up speed
end
if GetTimer(e) >= timeToFloatUp*timeToFloatDown then
StartTimer(e)
end
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 100.0 then -- Higher number increase range from where you can pick up weapons
PromptDuration("Collected the " .. weapon_name[e],3000)
PlaySound(e,0)
AddPlayerWeapon(e)
Destroy(e)
ActivateIfUsed(e)
end
end
Have fun(Works also in multiplayer for some cool quake style fast pace shooters)
If something not work, please explain as good as you can what happen.
My dream is to develope games, which makes fun when I create it and fun when other people play it.