screenEffect does seem to get transformed to follow the camera instead of the party object (since the camera itself is offset from the party) so yes, if you want to follow the camera like screenEffect you will have to use either screenEffect itself (no need to do so through PartyComponent:playScreenEffect()) or reverse engineer it (which I don't recommend).Eburt wrote:I guess I should clarify that the issue is really just when I move the camera up or down (it sort of pushes forward into the floor if I look down and pulls back when I look up). It pans fine and does move correctly with the party. The built in screenEffects appear to work regardless of the camera rotation axis. The only differences I can see to the way it's done in the base definitions are:
1. They use boxMin and boxMax to position the particle where as I use an offset in the actual particle defintion.
2. I am simply enabling the particle component attached to the party, rather than calling PartyComponent:playScreenEffect().
I tested number 1 and it didn't seem to make a difference. Do I have to use playScreenEffect or am I just missing something obvious?
Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
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
Thanks minmay - I appreciate your patience. I've got everything working smoothly now.
Edit: Wait, I lied. It works, but only until another screen effect is activated. E.g., getting hit by a fireball "overrides" the screen effect that I activated. The obvious workaround to me would be to keep activating my screen effect, but I think that could make for some ugly cut-off fireball effects...
Edit: Wait, I lied. It works, but only until another screen effect is activated. E.g., getting hit by a fireball "overrides" the screen effect that I activated. The obvious workaround to me would be to keep activating my screen effect, but I think that could make for some ugly cut-off fireball effects...
Re: Ask a simple question, get a simple answer
Yes, a ParticleComponent can have only one particle system at a time.
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
What exactly are you doing with the screen effect? Is this something that can be done using a 3D model instead of a particle system?Eburt wrote:Thanks minmay - I appreciate your patience. I've got everything working smoothly now.
Edit: Wait, I lied. It works, but only until another screen effect is activated. E.g., getting hit by a fireball "overrides" the screen effect that I activated. The obvious workaround to me would be to keep activating my screen effect, but I think that could make for some ugly cut-off fireball effects...
Re: Ask a simple question, get a simple answer
How to check what items are in a certain tile or what items are on a certain pressure plate?
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Ask a simple question, get a simple answer
You can use in a script: party.map:entitiesAt(x,y) or self.go.map:entitiesAt(x,y) where x,y is the position of the tile; I think you have no specific call for a floor trigger.The cube wrote:How to check what items are in a certain tile or what items are on a certain pressure plate?
Then you can explore the list for a specific item:
Code: Select all
for e in party.map:entitiesAt(x,y) do
if e.name=="youritemname" then
--here the action to perform
end
end
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
Is it possible to access spells data outside their definitions ? I would like to check skills requirements for a spell knowing its name.
Re: Ask a simple question, get a simple answer
Code: Select all
function checkplatforms()
if magic_bridge_21.magic_bridge:getState() == activated then
hudPrint("works!")
end
end
function checkplatforms()
if magic_bridge_21.controller:getState() == activated then
hudPrint("works!")
end
end
function checkplatforms()
if magic_bridge_21.magic_bridge:isActivated() then
hudPrint("works!")
end
end
function checkplatforms()
if magic_bridge_21.controller:isActivated() then
hudPrint("works!")
end
end
Re: Ask a simple question, get a simple answer
Magic bridges do not have a component named magic_bridge. Neither ControllerComponent nor PlatformComponent have a component called getState. Grimrock 2 has a scripting reference (and another one here), as well as the asset pack which contains all object definitions (go to page 3 of that thread for a mirror). At a minimum, you should really read and understand the definition of an object before you use it. What you probably wanted is:
Code: Select all
function checkplatforms()
if magic_bridge_21.platform:isEnabled() then
hudPrint("works!")
end
end
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
When I set an onDamage hook for the party and print out the incoming variables, I see who was attacked, how they were attacked, and for how much damage.
But when I return False from the function, the attack still damages the champion. Is this a bug, or a deliberate change from similar behaviors in some LoG1 functions? It seems awfully amiss to have an onDamage hook that doesn't allow canceling. What is the point of the onDamage hook in LoG2?
But when I return False from the function, the attack still damages the champion. Is this a bug, or a deliberate change from similar behaviors in some LoG1 functions? It seems awfully amiss to have an onDamage hook that doesn't allow canceling. What is the point of the onDamage hook in LoG2?