Beta 2.1.18
Re: Beta 2.1.18
Only anomaly I've noticed is occasionally, the game will simply minimize itself. I am however, able to bring it right back up and continue game play.
Regards,
RMariano
RMariano
Re: Beta 2.1.18
The game does not minimize itself. Its your other sofwaveres running on the background that request an API call to make window open. The game itself asks "i like to go fullscreen". It does not interfere any API calls does by another softwares of yours.
-arc
-arc
Re: Beta 2.1.18
That behavior was due to an app that was running in the BG.RMariano wrote:Only anomaly I've noticed is occasionally, the game will simply minimize itself. I am however, able to bring it right back up and continue game play.
Condition corrected and no trubs since......
Regards,
RMariano
RMariano
Re: Beta 2.1.18
Is the full updated fix list placed anywhere in the forum?
Does it include the setDoorState() bug that Isaac found mentioned in this forum topic
Does it include the setDoorState() bug that Isaac found mentioned in this forum topic
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: Beta 2.1.18
2.1.18 is literally 2.1.17 plus one fix regarding misplaced crystals i.e. in the catacombs.Frenchie wrote:Is the full updated fix list placed anywhere in the forum?
This bug was discovered after 2.1.18 went live, so the answer is "No"Frenchie wrote:Does it include the setDoorState() bug that Isaac found mentioned in this forum topic
Re: Beta 2.1.18
AFAIK [now], the setDoorState() issue is not seen as a bug; (so it may or may not be worked on). The setDoorState() function is apparently only intended to be used internally during level setup at load; (not in user scripts). It would be nice if it did get changed to work smoothly (as it did in LoG); I found it useful.
*A serviceable workaround is to enable/disable the model and door components of the door object.
*A serviceable workaround is to enable/disable the model and door components of the door object.
Re: Beta 2.1.18
setDoorState() is trivial to implement yourself, guys...just change all the door's sounds to silence, give it infinite open/close speed, open/close it, then restore the original values the next frame.
Also, 2.1.18 fixed the GameObject:getPosition() bug, did it not?
Also, 2.1.18 fixed the GameObject:getPosition() bug, did it not?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Beta 2.1.18
It's trivial, but it would be better to have it work reliably; it's in the script reference. Either that or remove it from the suggested usable function calls.minmay wrote:setDoorState() is trivial to implement yourself, guys...just change all the door's sounds to silence, give it infinite open/close speed, open/close it, then restore the original values the next frame.
Also, 2.1.18 fixed the GameObject:getPosition() bug, did it not?
A replacement function that enables/ or disables the model and door [for collision] components seems to work pretty well; though I haven't really tested it, other than to try it a few times.
Re: Beta 2.1.18
That solution won't work if you want the user to see or interact with the door, or if you want to close the door instead of opening it, or a bunch of other things. Here's a version you can use instead.
Put the following in a script entity called frameutils:
Add the following component to the definition of "party":
Then define a sound called "silence" that's just silence.
Code: Select all
-- a version of setDoorState that...actually works
function safeSetDoorState(gameObject,doorComponentName,state)
local door = gameObject[doorComponentName]
if state == "closed" then
local closeSound, closeVelocity, lockSound = door:getCloseSound(), door:getCloseVelocity(), door:getLockSound()
door:setCloseSound("silence") door:setCloseVelocity(-math.huge) door:setLockSound("silence")
door.go.controller:close()
frameutils.script.callNextFrame(safeSetDoorStateCleanup,{gameObject.id,doorComponentName,state,closeSound,closeVelocity,lockSound})
elseif state == "open" then
local openSound, openVelocity, lockSound = door:getOpenSound(), door:getOpenVelocity(), door:getLockSound()
door:setOpenSound("silence") door:setOpenVelocity(math.huge) door:setLockSound("silence")
door.go.controller:open()
frameutils.script.callNextFrame(safeSetDoorStateCleanup,{gameObject.id,doorComponentName,state,openSound,openVelocity,lockSound})
else
Console.warn("invalid door state ("..state..") in safeSetDoorState for "..gameObject.id.."."..doorComponentName)
end
end
function safeSetDoorStateCleanup(gameObjectId, doorComponentName, state, sound, velocity, lockSound)
local door = findEntity(gameObjectId)[doorComponentName]
door:setLockSound(lockSound)
if state == "closed" then
door:setCloseSound(sound) door:setCloseVelocity(velocity)
elseif state == "open" then
door:setOpenSound(sound) door:setOpenVelocity(velocity)
else
Console.warn("invalid door state ("..state..") in safeSetDoorStateCleanup for "..gameObjectId.."."..doorComponentName)
end
end
Code: Select all
nextFrameFunctions = {}
function onFrame()
for _,nff in ipairs(nextFrameFunctions) do
local arg = nff.arg
-- CANNOT be shortened to
-- nff.hook(type(arg) == "table" and unpack(arg) or arg)
-- due to and/or only evaluating to the first value in the table.
if type(arg) == "table" then
nff.hook(unpack(arg))
else
nff.hook(arg)
end
end
nextFrameFunctions = {}
end
-- Call function func next frame with arguments in table args (or just args as
-- one argument, if it is not a table). They are called
-- in the same order that callNextFrame is called.
function callNextFrame(func,args)
table.insert(nextFrameFunctions,{hook=func,arg=args})
end
Code: Select all
{ -- This will trigger once every frame.
class = "Timer",
name = "frame_timer",
timerInterval = 0.001,
onActivate = function(self)
frameutils.script.onFrame()
end,
},
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.