I noticed when I used the converted FPSC original door.lua script that "g_Entity[e]['plrvisible']==1" never equals 1. ummmm all weird....
other than that the door opens and close and plays sounds and collision works if I uncomment the plrvisibile bit out.
--[[ LUA Script converted from FPSC to GameGuru by M.Fowler (c) 2017
Original FPI file can be found under:
C:\Program Files (x86)\The Game Creators\FPS Creator\Files\scriptbank\door1.fpi
]]
function door1_init(e)
state = 0 ;
end
function door1_main(e)
if state == 0 and GetPlayerDistance(e) < 120 then
state = 4
end
if state == 1 then
SetAnimationFrame(e,g_Entity[e]['frame']+1)
end
if state == 1 and g_Entity[e]['frame'] == GetEntityAnimationFinish(e,0) then
state = 2
CollisionOff(e)
end
if state == 2 and GetPlayerDistance(e) > 120 then
state = 3
PlaySound(e,1)
CollisionOn(e)
end
if state == 3 then
SetAnimationFrame(e,g_Entity[e]['frame']-1)
end
if state == 3 and g_Entity[e]['frame'] == GetEntityAnimationStart(e,0) then
state = 0
SetAnimationFrame(e,0)
end
if state == 4 then --and g_Entity[e]['plrvisible']==1 then
state = 1
SetAnimationFrame(e,0)
PlaySound(e,0)
end
PromptLocal (e,'state=' .. state .. ' plrvisible=' .. g_Entity[e]['plrvisible'])
end
function door1_exit(e)
end
--*** ALL FPSC CONDITION/ACTION KEYWORDS CONVERTED :-) ***
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT