Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
AFAIK you can't. It's a sore spot. People do it by importing the music as sound effects, but this means no compression, and problems with resuming playback.
Re: Ask a simple question, get a simple answer
GameMode.playStream("myTrack")
Works perfectly fine in my mod on the millisecond.
It jumps from "ambient" to "combat tune" to "victory tune" onDie and then back to "ambient" when it needs to with some very basic scripting.
Works perfectly fine in my mod on the millisecond.
It jumps from "ambient" to "combat tune" to "victory tune" onDie and then back to "ambient" when it needs to with some very basic scripting.
Re: Ask a simple question, get a simple answer
When I use GameMode.playStream(), the music stops when changing levels, and you cannot resume from where it was playing when it stopped. The regular (conventionally assigned) ambient tracks fade when transitioning levels, but they resume where they left off, upon arrival.
Re: Ask a simple question, get a simple answer
No, they restart too.
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.
Re: Ask a simple question, get a simple answer
They did not for me, last night—but that was in the editor.. I did not test it in the game.
https://vimeo.com/366091640
Update: I did just test it in the game, and they do resume where they left off at the transition.
Re: Ask a simple question, get a simple answer
Oh, sorry, I thought you were talking about returning to a level after visiting one with a different ambient track, not going between levels that have the same ambient track.
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.
Re: Ask a simple question, get a simple answer
Ah... I get what you mean; where returning upstairs would not resume the previous track where it left off.
- Eleven Warrior
- Posts: 746
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Ask a simple question, get a simple answer
Heloo. Im using the fw hooks by jkos in my mod and im trying to get this to work:
Basically when the party picks up the lock pick the counter should decrement but it does'nt what is wrong with my code?
Code: Select all
onPickUpItem = function(self, lock_pick_3)
counter_23.counter:decrement()
end
Re: Ask a simple question, get a simple answer
As far as I understand.
The speed of all the maps you're currently not on are updated only 1/10th?
Is this correct? Or how exactly does it work?
For example a timer with a 1 second interval will only update or "tick" every 10 seconds when you're not on the same map of the timer? I can see this clearly happening (for example npc actions ordering to a certain location while you're not on that map)
Now for example you are on map 1
a timer placed on map 2 set to "1" interval will tick every 10 seconds once now as long it gives a command to anything on map 2
I can still see this happening.
But I have this odd setup where you are on map 1, a timer on map 2 gets activated ordering an npc around on map 3.
slowing down the process to at least 1/100th.
Yes, I know it's silly and complicated, but that's what you get with multiple dimensions.
I "can" change it, but again, the speed the npc's move or reach their destination isn't important, neither is reaching their destination.
It's just to get their ass away from a thing they're standing in front off. And I'm too lazy to change all the things I have in place now.
Can I leave in these lazy mechanics or is there any way this can break the movement sequence? (by saving/loading or whatever)
I just let the game run and eventually after 20+ minutes, the npc does reach the intended target.
Again, the amount of time they take to reach their location is not important.
One of the many examples where this is happening:
Basically, in the ice dimension you need to help someone out who is freezing their ass off in his house. So you light up his fireplace with some wooden logs you carry around for whatever silly "grimrock reasons"
The cold peasant thanks you and now shuffles towards his fireplace at original speed.
Meanwhile in the normal dimension the same peasant in the same house is confused because the dimensions leak into eachother and out of nowhere his fireplace starts burning and he shuffles at 1/10th speed towards his fireplace. Telling you all about the strange things happening in his house when you get back into his house and his fireplace started burning brightly on its own.
In the fire dimension, the same peasant in the same house starts freaking out as there is a shortage of water, it's already freakishly hot out there and then his house changes into an oven even more with the fireplace suddenly burning bright!
In all 3 houses the peasants simply move away from a wall so you can take stuff from the wall alcove that was previously blocked by the peasants.
The speed of all the maps you're currently not on are updated only 1/10th?
Is this correct? Or how exactly does it work?
For example a timer with a 1 second interval will only update or "tick" every 10 seconds when you're not on the same map of the timer? I can see this clearly happening (for example npc actions ordering to a certain location while you're not on that map)
Now for example you are on map 1
a timer placed on map 2 set to "1" interval will tick every 10 seconds once now as long it gives a command to anything on map 2
I can still see this happening.
But I have this odd setup where you are on map 1, a timer on map 2 gets activated ordering an npc around on map 3.
slowing down the process to at least 1/100th.
Yes, I know it's silly and complicated, but that's what you get with multiple dimensions.
I "can" change it, but again, the speed the npc's move or reach their destination isn't important, neither is reaching their destination.
It's just to get their ass away from a thing they're standing in front off. And I'm too lazy to change all the things I have in place now.
Can I leave in these lazy mechanics or is there any way this can break the movement sequence? (by saving/loading or whatever)
I just let the game run and eventually after 20+ minutes, the npc does reach the intended target.
Again, the amount of time they take to reach their location is not important.
One of the many examples where this is happening:
Basically, in the ice dimension you need to help someone out who is freezing their ass off in his house. So you light up his fireplace with some wooden logs you carry around for whatever silly "grimrock reasons"
The cold peasant thanks you and now shuffles towards his fireplace at original speed.
Meanwhile in the normal dimension the same peasant in the same house is confused because the dimensions leak into eachother and out of nowhere his fireplace starts burning and he shuffles at 1/10th speed towards his fireplace. Telling you all about the strange things happening in his house when you get back into his house and his fireplace started burning brightly on its own.
In the fire dimension, the same peasant in the same house starts freaking out as there is a shortage of water, it's already freakishly hot out there and then his house changes into an oven even more with the fireplace suddenly burning bright!
In all 3 houses the peasants simply move away from a wall so you can take stuff from the wall alcove that was previously blocked by the peasants.
Re: Ask a simple question, get a simple answer
I'm getting this error message when casting a spell in game (not in the editor)
Happens immediately as the spell is cast, and only with the exported mod
Code: Select all
[string "Champion.lua"]:0: attempt to index a nil value
stack traceback:
[string "Champion.lua"]: in function 'addTrait'
[string "Champion.lua"]: in function 'castSpell'
[string "RunePanel.lua"]: in function 'endGesture'
[string "RunePanel.lua"]: in function 'updatePanel'
[string "AttackPanel.lua"]: in function 'update'
[string "AttackPanel.lua"]: in function 'update'
[string "Gui.lua"]: in function 'draw'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk