Page 1 of 1

[SOLVED] Creating a hidden trapdoor

Posted: Sun Nov 02, 2014 2:45 pm
by OGDA
Hello,

the orginal bug is solved thanks to Skuggasveinn (see 4 posts down).

--------------------------------

Original message:

I've encountered a reproducible bug:

In a forest is a hole (floor of the tile on -7) and a forest_ground_01 over it to hide it. On the same tile is a floor trigger which executes

Code: Select all

function spawnethforest2trapdoor()
	ethpit1 = spawn("dungeon_pit_trapdoor", 4, 15, 22, 0 , 0, "ethpit")
	forest_ground_01_1.model:disable()
	ethpit1.pit:open()
end
to create a trap pit the player can't see before and immediately falls through down to the next level.
Until this point everything works fine.

As soon as you try to save the game after this event, it always crashes.

Image

Here are the source files of the small dungeon with only this event to recreate the bug:

(right click, save as)
https://das-kartell.org/files/Test_Bug.dat
https://das-kartell.org/files/Test_Bug.zip

The bug happens on every try on my computer.

King regards,
Joerg

Re: [BUG-REPRODUCIBLE] Crashes after dyn. trapdoor and savin

Posted: Sun Nov 02, 2014 2:53 pm
by Skuggasveinn
-EDIT , no it crashes when saving :D

Skuggasveinn.

Re: [BUG-REPRODUCIBLE] Crashes after dyn. trapdoor and savin

Posted: Sun Nov 02, 2014 3:00 pm
by Doridion
Could more modders confirm that bug with trying it ?

Re: [BUG-REPRODUCIBLE] Crashes after dyn. trapdoor and savin

Posted: Sun Nov 02, 2014 3:04 pm
by GoldenShadowGS
Sort of unrelated. I accidently saved two -- on one of my entity names and didn't realize it and saved the dungeon. The editor wouldn't open dungeon.lua after that. I had to manually scan through it with notepad++ looking for problems when I discovered it. I deleted the two dashes -- and the editor could load it again.

To explain why I did it. I bind keypad - and + to elevation changes for entities. It only works if you haven't clicked on the name field.

Re: [BUG-REPRODUCIBLE] Crashes after dyn. trapdoor and savin

Posted: Sun Nov 02, 2014 3:04 pm
by Skuggasveinn
fixed

Code: Select all

function spawnethforest2trapdoor()
	spawn("dungeon_pit_trapdoor", 1, 15, 14, 0 , 0, "ethpit")
	forest_ground_01_1.model:disable()
	ethpit.pit:open()
end
you can not create a local variable that needs to have its state saved. (you created ethpit1 that is a local and then changed it state to open)
you need to be addressing the entity itself.

Re: [BUG-REPRODUCIBLE] Crashes after dyn. trapdoor and savin

Posted: Sun Nov 02, 2014 3:10 pm
by Doridion
Ok, so classified as a human bug :D ( Joke )

Re: [SOLVED] Creating a hidden trapdoor

Posted: Sun Nov 02, 2014 3:40 pm
by OGDA
Thank you, Skuggasveinn! :)

I've changed the title and orginal post so that other can find this.

Kind regards,
Joerg

Re: [SOLVED] Creating a hidden trapdoor

Posted: Sun Nov 02, 2014 3:44 pm
by Doridion
THanks to you, sticked in the superthread as solved bugs ;)