local txtP = getObject('Conditions[txtP?]')
local txtP = getObject("Conditions[txtP?]")
local txtP = getObject("Interfaces[vk_cmds].InterfaceConditions[txtP?]")
local txtP = getObject("Interfaces[vk_cmds].Conditions[txtP?]")
local txtP = getObject("Conditions[txtP?]"):getValue(VConditionValue)
local txtP = getObject("Conditions[txtP?]") -- short linking
-- or getObject("Interfaces[vk_cmds].InterfaceConditions[txtP?]") -- direct linking
if txtP:getBool(VConditionValue) then
-- do something
end
if txtP:getBool(VConditionValue) == true then
-- do something (true)
else
-- do something (false)
end
if getObject("Conditions[txtP?]"):getBool(VConditionValue) then
-- do something
end
local fadefx = 0
if game:getInt(VGameFadeEffect) ~= 0 then
fadefx = game:getInt(VGameFadeEffect)
game:setValue(VGameFadeEffect, 0)
end
-- + --
game:setValue(VGameCurrentScene, getObject("Scenes[scene_name]")
if fadefx ~= 0 then game:setValue(VGameFadeEffect, fadefx) end
function changeScene(s, t, d, fe, fd)
fe = game:getInt(VGameFadeEffect); fd = game:getInt(VGameFadeDelay)
-- + --
if t < 0 then t = 0 elseif t > 7 then t = 7 end
game:setValue(VGameFadeEffect, t); game:setValue(VGameFadeDelay, d)
-- + --
game:setValue( VGameCurrentScene, getObject("Scenes[" .. s .. "]") )
-- + --
game:setValue(VGameFadeEffect, fe); game:setValue(VGameFadeDelay, fd)
end
changeScene("scene_name", effect int, delay int)
Effect for fade in/out of a scene.
'0' (eFadeNo): no effect. display new scene immediately.
'1' (eFadeIn): fade in. Only fade in new scene. No fade out of current scene.
'2' (eFadeOut): fade out. Only fade out current scene. No fade in of new scene.
'3' (eFadeInAndOut): fade in/out. Fade out current scene and fade in new scene.
'4' (eFadeToNew): fade to new. Use alpha-blending to directly fade from current to new scene.
'5' (eShiftLeft): shift left. Shift current scene to the left and show new scene.
'6' (eShiftRight): shift right. Shift current scene to the right and show new scene.
'7' (eTunnelEffect): tunnel effect. Use a tunnel effect for fade in/out.
local fadefx = 0
fadefx = game:setValue(VGameFadeEffect, 0)
if txtP == true then
game:setValue( VGameCurrentScene, getObject("Scenes[0015commands_clearENG]"))
game:setValue(VGameFadeEffect, fadefx)
end