Page 1 of 1
Blockage Problem
Posted: Thu Dec 11, 2014 2:28 am
by Eleven Warrior
Hi to any one who can help with this. Ok I have a fake wall with a door. I can make the fake wall an obstacle no problems, but when you walk towards the wall you are stopped by the Blockage 1 tile in front of the wall. What I need to know is how do you allow the player to walk up to the wall face to face, but they cant pass through it. Here is the code I have ATM (below). I can make this wall a door, but that seems stupid, why because if you have lots of these fake wall-doors on the levels, I believe it will slow the game down sooner or later I think. I need to know how I can make the blockage around the wall shrink to a door blockage area. I do hope this makes sense lol
Code: Select all
defineObject{
name = "sx_town_door",
components = {
{
class = "Model",
model = "mod_assets/sx_towntileset/models/sx_town_door.fbx",
},
{
class = "Obstacle",
blockItems = true,
blockMonsters = true,
blockParty = true,
repelProjectiles = true,
},
{
class = "ProjectileCollider",
size = vec(0.4,1,1),
},
},
placement = "wall",
editorIcon = 120,
}
Re: Blockage Problem
Posted: Thu Dec 11, 2014 3:06 am
by Batty
Placing a door and unchecking "model" in the inspector is the simple way to do it. You could place hundreds of them, probably thousands, it won't slow the game down. Lighting & water slow the game.
Re: Blockage Problem
Posted: Thu Dec 11, 2014 3:32 am
by minmay
Use a DoorComponent. It's how the mine support walls etc. do it; look at the asset pack.
Re: Blockage Problem
Posted: Thu Dec 11, 2014 7:06 am
by Grimfan
Batty wrote:Placing a door and unchecking "model" in the inspector is the simple way to do it. You could place hundreds of them, probably thousands, it won't slow the game down. Lighting & water slow the game.
I second this. One of the best things about components is the amount they can be manipulated.
Re: Blockage Problem
Posted: Fri Dec 12, 2014 2:22 am
by Eleven Warrior
Ok I checked out the mine lua file and found what I needed and this is what I have (code below). It works the way I want it to but in the editor it says (gate node not found on sx_town_door_1) I do not know what is missing or what a gate node is lol.
Code: Select all
defineObject{
name = "sx_town_door",
components = {
{
class = "Model",
model = "mod_assets/sx_towntileset/models/sx_town_door.fbx",
staticShadow = true,
},
{
class = "Door",
sparse = true,
hitSound = "impact_blunt",
},
},
placement = "wall",
editorIcon = 160,
automapIcon = 88,
minimalSaveState = true,
}
Re: Blockage Problem
Posted: Fri Dec 12, 2014 2:41 am
by MadCatter
I had problems with this for a while too.
With your custom model, in GMT where you set the materials you simply need to select the model node from the drop-down box and type "gate" into the box that says name, then click Update Node and re-save your model.
The gate node is the part that grimrock animates with the opening/closing. All door nodes have this name, I guess for consistencies sake.
Re: Blockage Problem
Posted: Sat Dec 13, 2014 12:55 am
by Eleven Warrior
Thxs Madcatter it did the trick awesome man now I can continue with the Sx Town Set thanks again

4 Kuddos added.
Re: Blockage Problem
Posted: Sat Dec 13, 2014 5:37 am
by Eleven Warrior
Hi again lol. I am trying to get this Object to move left or right (Below code). I can move the object up/down and forward and backwards NP. I am using the offset = vec routine. 0.3, 0.5 = up/down + 0,0,0 = back/forward I think which works on one of the 0's. Does anyone know how I can move this object left or right?
I can do it in the Editor using setworldpositon, but this is not what I need. The object below is the water effect on the wall fountain thxs for any help
Code: Select all
defineObject{
name = "sx_fountain_effect",
components = {
{
class = "Particle",
particleSystem = "sx_fountain_effect",
offset = vec(0.3, 0.5 + 0, 0, 0),
--offset = vec(0.3, 0.3, 0,1),
},
{
class = "Light",
offset = vec(0, 1.8, 0),
range = 5,
color = vec(0.2, 0.75, 0.5),
brightness = 4,
fillLight = true,
},
{
class = "Controller",
onActivate = function(self)
self.go.light:enable()
self.go.particle:enable()
end,
onDeactivate = function(self)
self.go.light:disable()
self.go.particle:disable()
end,
onToggle = function(self)
if self.go.light:isEnabled() then
self.go.light:disable()
self.go.particle:disable()
else
self.go.light:enable()
self.go.particle:enable()
end
end,
},
},
placement = "floor",
editorIcon = 88,
}
Re: Blockage Problem
Posted: Sat Dec 13, 2014 1:08 pm
by Drakkan
Eleven Warrior wrote:Hi again lol. I am trying to get this Object to move left or right (Below code). I can move the object up/down and forward and backwards NP. I am using the offset = vec routine. 0.3, 0.5 = up/down + 0,0,0 = back/forward I think which works on one of the 0's. Does anyone know how I can move this object left or right?
I can do it in the Editor using setworldpositon, but this is not what I need. The object below is the water effect on the wall fountain thxs for any help
Code: Select all
defineObject{
name = "sx_fountain_effect",
components = {
{
class = "Particle",
particleSystem = "sx_fountain_effect",
offset = vec(0.3, 0.5 + 0, 0, 0),
--offset = vec(0.3, 0.3, 0,1),
},
{
class = "Light",
offset = vec(0, 1.8, 0),
range = 5,
color = vec(0.2, 0.75, 0.5),
brightness = 4,
fillLight = true,
},
{
class = "Controller",
onActivate = function(self)
self.go.light:enable()
self.go.particle:enable()
end,
onDeactivate = function(self)
self.go.light:disable()
self.go.particle:disable()
end,
onToggle = function(self)
if self.go.light:isEnabled() then
self.go.light:disable()
self.go.particle:disable()
else
self.go.light:enable()
self.go.particle:enable()
end
end,
},
},
placement = "floor",
editorIcon = 88,
}
As I already made some minor changes with offset I am aware there are actually 4 parms, not just three. I was able to move object any way I think
offset = vec(0,0,0,0),
also please be aware (perhaps you already noticed) that if you change some of this inside script and just reload editor it will not come true, you have to "hard reset" whole editor. Just an observation perhaps it helps you a little.