Page 1 of 1

[bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 10:25 am
by Damonya
With the function : PressurePlate:destroy()

I have this bug :
SpoilerShow
Image
No texture under the destroy plate.

Re: [bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 10:33 am
by antti
This behaviour is expected since the pressure plate mesh contains the floor as well. To fix this, you need to spawn some floor pieces on the empty spots but you probably need to define a new custom asset if you want to get the normal plain looking floor (instead of, say, a floor with a drain) since the plain floors are normally only placed by the wall sets.

Re: [bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 10:40 am
by Damonya
Ok thanks. If I spawn dungeon_floor_drainage it 's good. But it is the only. I tried with floor_dirt and others and it doesn't work.

Re: [bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 10:59 am
by Xanathar
Add these to your objects.lua file:

Code: Select all

defineObject{
	name = "dummy_floor_dungeon",
	class = "Decoration",
	model = "assets/models/env/dungeon_floor_01.fbx",
	placement = "floor",
	replacesFloor = true,
	editorIcon = 136,
}

defineObject{
	name = "dummy_floor_temple",
	class = "Decoration",
	model = "assets/models/env/temple_floor_01.fbx",
	placement = "floor",
	replacesFloor = true,
	editorIcon = 136,
}

defineObject{
	name = "dummy_floor_prison",
	class = "Decoration",
	model = "assets/models/env/prison_floor_01.fbx",
	placement = "floor",
	replacesFloor = true,
	editorIcon = 136,
}
For any other wallset you use apart the three default ones, you have to create your own definitions.

Re: [bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 11:13 am
by Komag
Yeah, and if you have like a room full of plates that you will be destroying (for some odd crazy reason), then you'll want to randomize the facing of the replacement floors in your spawn code, so instead of just putting '0' or '3' or whatever, put 'math.random(0,3)'

Re: [bug] PressurePlate:destroy() = black glitch

Posted: Mon Mar 11, 2013 12:23 pm
by Damonya
Yes thanks very well xanathar. It works great :D
(for some odd crazy reason)
I like to change the configuration of my rooms after events and add new puzzles juxtaposed via script in the same room. Destroy and spawn is fun :mrgreen: