Has anyone assigned the "gravity" component?
I have added it to a few objects, and they do ~eventually~ fall when no longer supported, but this happens seconds after the support is removed. Has anyone learned of a way to call or update gravity in the script?
Obviously objects the player drops (in pits) fall immediately, so the must be a way.
When Gravity Fails...
Re: When Gravity Fails...
I just tried this,
hoping it would work. No deal.
Code: Select all
party:createComponent("Gravity")
party.gravity:disable()
Re: When Gravity Fails...
party already has a gravity component from my testing it seems to get enabled whenever the party would fall. So disabling it doesn't do anything useful unless the party is already falling (in which case it can stop them in midair, but they'll fall again as soon as they move or non-mouselook turn).
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: When Gravity Fails...
Sounds perfect for a levitation spell...
Re: When Gravity Fails...
I added a Gravity component to an item, put it on a bridge and destroyed the bridge using a pressure plate activating a script and the item falls immediately, there's no delay. I didn't put any fields in the component:
you can add fallingSpeed = x but you don't need it. Haven't tried anything else. 
Code: Select all
{
class = "Gravity"
}- QuintinStone
- Posts: 72
- Joined: Sat Nov 01, 2014 9:58 pm
Re: When Gravity Fails...
Does party.onMove() get called when a party starts falling?
Crypt of Zulfar
Re: When Gravity Fails...
This is what I did, but the item falls somewhere between 3 to 5 seconds later. I was hoping that there was an update function I could call from the bridge/plate script.Batty wrote:I added a Gravity component to an item, put it on a bridge and destroyed the bridge using a pressure plate activating a script and the item falls immediately, there's no delay. I didn't put any fields in the component:you can add fallingSpeed = x but you don't need it. Haven't tried anything else.Code: Select all
{ class = "Gravity" }
It does indeed.gambit37 wrote:Sounds perfect for a levitation spell...
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: When Gravity Fails...
Has anyone found a solution to skip the 5 seconds cartoon situation before a gameobject realizes there is no floor under it ? ^^
I try to define a pushable ice block but it does not fall immediatly when it should. Also, when it falls it does it as a quamtum particle, it teleports to the floor below without any fall animation ! Ok, this object has no item component, could it be the cause of those problems ?
I try to define a pushable ice block but it does not fall immediatly when it should. Also, when it falls it does it as a quamtum particle, it teleports to the floor below without any fall animation ! Ok, this object has no item component, could it be the cause of those problems ?