I have a few little requests what I hope people might be able to help me with.
One is, is it possible to covert the Pet script to make a item follow the player not a NPC?
local input_key = "e"
local state = {}
local pressed = 0
function pet_init(e)
state[e] = "stay"
CharacterControlUnarmed(e)
end --init
function pet_main(e)
if state[e] == "stay" then
if GetPlayerDistance(e) < 160 then
PromptLocal(e,"follow?")
if g_InKey == input_key and pressed == 0 then
pressed = 1
state[e] = "follow"
end
end
elseif state[e] == "follow" then
if GetPlayerDistance(e) > 300 then
SetCharacterToRun(e)
ModulateSpeed(e,1.1)
elseif GetPlayerDistance(e) > 160 and GetPlayerDistance(e) < 275 then
SetCharacterToWalk(e)
ModulateSpeed(e,1)
end
if GetPlayerDistance(e) > 160 then
AIEntityGoToPosition(g_Entity[e]['obj'],g_PlayerPosX,g_PlayerPosZ)
else
AIEntityGoToPosition(g_Entity[e]['obj'],g_Entity[e]['x'],g_Entity[e]['z'])
AIEntityStop(e)
end
if GetPlayerDistance(e) < 130 then
PromptLocal(e,"stay?")
if g_InKey == input_key and pressed == 0 then
state[e] = "stay"
AIEntityGoToPosition(g_Entity[e]['obj'],g_Entity[e]['x'],g_Entity[e]['z'])
AIEntityStop(e)
pressed = 1
end
end
end
if pressed == 1 and g_InKey ~= input_key then
pressed = 0
end
end --main
Also is there away to skip the open menu, use our own pause menu and our own finish menus ?
If there any way to integrate Lua 5.1 over the older 5.0 what is in the main exe?
If there a full list of functions we have access to ? and is editing the default lua promitted by the EULA ?
Autoplay Media Studios Lua Scripter, RPG Maker Creator, FPSC and now GG user.