Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Hey there,
is that possible to make a stair that did not show the fade in animation?
(it's for somekind of stair, used to go in a 2nd floor in the same level)
is that possible to make a stair that did not show the fade in animation?
(it's for somekind of stair, used to go in a 2nd floor in the same level)
Re: Ask a simple question, get a simple answer
I had the same question a while ago. The answer was: No! If not minm- ...erm, a tech-freak meanwhile found a solution...
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
You could have an instant fade in apply once you go up/down the stairs.THOM wrote:I had the same question a while ago. The answer was: No! If not minm- ...erm, a tech-freak meanwhile found a solution...
Your party will jump a bit forward and there might be a single frame of blackness, but its something
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
ok based on what you've say here what I 've done:
2 floor_triggers (on the screenshot, one is just where I stay - 2nd floor, one is at the bottom of the stairs), that trigger a timer and which timer trigger a script:
timer is set to 0.01 in interval, disable self should not be set, so the timer repetively trigger the scripts, until it is stopped by others floor_trigger. In this case I have put those floor trigger plates all around the trigger plate that start the timer.
the script is about to fade quickly:
(I did not use a timer on the first time, and place the trigger plates, directly on the first square of the stairs, but it seems that the stairs has priority against the floor trigger, and the game didn't take in count the fadeIn things. So finaly I use a timer which runs infinitely, this works.)
So, it runs perfect until the party come at the end of the stair, where a quick black screen is shown, immediately fading in by the timer.
The bottom stair is a model (used to go up), in fact there is the only model that is shown. The upper stair(used to go down) is just an invisible stair without model, there is also an invisible platform on the same height of the upper stair, or the party will run into big troubles.
bottom stair:
the bottom stairs block the items
upper stair:
the upper stairs let the items pass.
the side wall at the entrance of the bottom stair are not real wall but wall_decoration, if not the stairs kill basic walls. So they have no occluders, well, I didn't try to use occluders on a wall decoration.
Also there is the issue with the ceilings, which are removed on top of the stairs.
I tryed with fake stairs and invisible teleporters to go up and down, but I like more the walking on stairs effect.
SpoilerShow
timer is set to 0.01 in interval, disable self should not be set, so the timer repetively trigger the scripts, until it is stopped by others floor_trigger. In this case I have put those floor trigger plates all around the trigger plate that start the timer.
the script is about to fade quickly:
SpoilerShow
Code: Select all
function noBlackScreen()
GameMode.fadeIn(0x0,0.001)
end
SpoilerShow
So, it runs perfect until the party come at the end of the stair, where a quick black screen is shown, immediately fading in by the timer.
The bottom stair is a model (used to go up), in fact there is the only model that is shown. The upper stair(used to go down) is just an invisible stair without model, there is also an invisible platform on the same height of the upper stair, or the party will run into big troubles.
bottom stair:
SpoilerShow
Code: Select all
defineObject{
name = "stairs_up_open",
components = {
{
class = "Model",
model = "mod_assets/models/stairs_up_open.fbx",
staticShadow = true,
},
{
class = "Stairs",
direction = "up",
},
{
class = "Obstacle",
blockMonsters = true,
blockParty = false,
blockItems = true,
},
},
placement = "floor",
killHeightmap = true,
editorIcon = 44,
automapIcon = 96,
}
upper stair:
SpoilerShow
Code: Select all
defineObject{
name = "stairs_down_empty",
components = {
{
class = "Stairs",
direction = "down",
},
{
class = "Obstacle",
blockMonsters = true,
blockParty = false,
blockItems = false,
},
},
placement = "floor",
killHeightmap = true,
editorIcon = 48,
automapIcon = 100,
}
the side wall at the entrance of the bottom stair are not real wall but wall_decoration, if not the stairs kill basic walls. So they have no occluders, well, I didn't try to use occluders on a wall decoration.
Also there is the issue with the ceilings, which are removed on top of the stairs.
I tryed with fake stairs and invisible teleporters to go up and down, but I like more the walking on stairs effect.
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
You can bypass stairs killing walls/floors/pillars by initially placing them somewhere else where it won't interfere with anything, then have a script run on game start that'll move them to where you need em'.
There is a stairs model (from sx_towntileset) that functions as a platform for the tile above it, so the party won't fall down and cause some horrible issues.
script entity above left stairs:
script entity above right stairs:
script entity above the others:
scripts set the stairs to their location, stairs have invisible models and a custom location. However, I assume this'll be problematic if a player is to save/load a game.
Here's what it looks like in game: (Model is from sx_towntileset)
(The black frame is not seen in this gif due to compression)
As you can see, they party 'jumps' a bit forward when using this method, which is why I prefer having fade in/out.
Biggest issue is the stairs killing pillars/floors/ceiling.
Floor isn't a problem, can be added to the stairs up as their model, and set the material based on what you need,
Placing ceilings manually works fine.
Pillars though... I have no idea how to fix em without a custom model. I tried using a high pillar and just place them below/above the required location, but placing the upper one didn't work because it got removed by stairs_down. An impractical fix would be editing a pillars model to look like its where you need it, but its real location is on a lower height.
There is a stairs model (from sx_towntileset) that functions as a platform for the tile above it, so the party won't fall down and cause some horrible issues.
script entity above left stairs:
Code: Select all
dungeon_stairs_up_1:setPosition(self.go.x, self.go.y, self.go.facing, self.go.elevation, self.go.level)
Code: Select all
dungeon_stairs_down_4:setPosition(self.go.x, self.go.y, self.go.facing, self.go.elevation, self.go.level)
Code: Select all
function stairsFade()
GameMode.fadeIn(0, 0)
end
-- There is a timer (not shown in the screenshot) that triggers this function every 0.01 seconds
Here's what it looks like in game: (Model is from sx_towntileset)
(The black frame is not seen in this gif due to compression)
As you can see, they party 'jumps' a bit forward when using this method, which is why I prefer having fade in/out.
Biggest issue is the stairs killing pillars/floors/ceiling.
Floor isn't a problem, can be added to the stairs up as their model, and set the material based on what you need,
Placing ceilings manually works fine.
Pillars though... I have no idea how to fix em without a custom model. I tried using a high pillar and just place them below/above the required location, but placing the upper one didn't work because it got removed by stairs_down. An impractical fix would be editing a pillars model to look like its where you need it, but its real location is on a lower height.
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
Have you tried setting a custom destination for the stairs-down object, to the cell where the stairs-up object is?
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
Same effect as having a teleporter teleport you to a teleporter that would teleport you to the previous teleporter
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
I remember reading somewhere that you can attach items(models) to monsters via script, but I can't find it anywhere, nor am I able to figure it out myself.
Anyone knows anything about this, or was I just hallucinating?
Anyone knows anything about this, or was I just hallucinating?
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
The parentNode component property makes the component adopt the transform of a node in a ModelComponent on the same object (location, rotation, scale). For example, the air_elemental monster uses it to keep the SoundComponent at the same 3D position as the monster's head:
and the eyctopus monster uses it so the particles for the ink cloud come out of the monster's nether regions:
It's also supported on ModelComponent, LightComponent, and probably more. This object in ORRR3 uses it to make a ratling NPC hold a piece of cheese, without needing any new models, just a new animation.
Code: Select all
{
class = "Sound",
sound = "air_elemental_wind",
parentNode = "head",
},
Code: Select all
{
class = "Particle",
name = "analParticle",
parentNode = "anal",
particleSystem = "eyctopus_fart",
enabled = false,
--debugDraw = true,
},
Code: Select all
defineObject{
name = "or3_ratling_smith",
placement = "floor",
components = {
{
class = "Model",
model = "assets/models/monsters/ratling3.fbx",
boundBox = {pos=vec(0,0.9,0.2),size=vec(3,1.8,2.5)},
materialOverrides = {pistol="nothing"},
},
{
class = "Model",
name = "cheese",
model = "assets/models/items/cheese.fbx",
parentNode = "sword",
},
{
class = "Animation",
animations = {
idle = "mod_assets/core/animations/ratling3_anvil_idle.fbx",
getUp = "mod_assets/core/animations/ratling1_idle.fbx",
hit = "assets/animations/monsters/ratling/ratling3_get_hit_front_left.fbx",
},
currentLevelOnly = true,
playOnInit = "idle",
loop = true,
},
},
editorIcon = 4,
}
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
Attaching a model to a node for monsters with scaled down animations scales down the attached model, but the parent mesh gets resized to its original state
Rescaling models didn't help fixing it
Rescaling models didn't help fixing it
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!