Log In  

Hi all,
I'm using, from a LUA script, to draw the current room the method:

old_draw = _draw
function _draw()
    old_draw() -- draw the room and objects
    ...
end

It's great to draw the current room with just a function call.
But can I change the current room from LUA script code to draw the another room calling old_draw() function?
If not, can I draw directly another room without change to it?

Thanks in advance.
Best regards.

P#91328 2021-04-30 16:11

:: zep

Hi @braindead

You can use set_room(id) to jump to a room.. but!

You might want to wait for 0.3.6b later this week, as this will be handled a little more elegantly (the world camera currently needs to be manually adjusted), and alternatively, also has an api function to draw an arbitrary room to the display without needing to do any room jumping.

P#91718 2021-05-09 21:19

Great news, @zep. Thanks for the info.

EDIT: I've tested set_room(id) function to change the current room and works perfectly, thanks again, @zep

P#91735 2021-05-10 04:08 ( Edited 2021-05-10 08:11)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-05-14 19:24:25 | 0.034s | Q:11