[bug] PressurePlate:destroy() = black glitch

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Damonya
Posts: 134
Joined: Thu Feb 28, 2013 1:16 pm
Location: France
Contact:

[bug] PressurePlate:destroy() = black glitch

Post by Damonya »

With the function : PressurePlate:destroy()

I have this bug :
SpoilerShow
Image
No texture under the destroy plate.
Orwak - MOD - Beta version 1.0
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

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

Post 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.
Steven Seagal of gaming industry
User avatar
Damonya
Posts: 134
Joined: Thu Feb 28, 2013 1:16 pm
Location: France
Contact:

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

Post 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.
Orwak - MOD - Beta version 1.0
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

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

Post 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.
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

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

Post 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)'
Finished Dungeons - complete mods to play
User avatar
Damonya
Posts: 134
Joined: Thu Feb 28, 2013 1:16 pm
Location: France
Contact:

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

Post 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:
Orwak - MOD - Beta version 1.0
Post Reply