If I remember correctly, you could destroy the object with the surface component and spawn another one and be save game friendly.minmay wrote:Actually, it doesn't. This taints the item and will cause a crash as soon as the user tries to save the game or pick up the item.zimberzimber wrote:Well, removing and re-adding the surface component works if it holds a single item
Ask a simple question, get a simple answer
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
No. That does not fix the object's fullId. The best-case scenario is that when you save and reload the game, the item is fully inserted in the new surface as if you never changed anything (and prior to the save/load, the item still considers itself a part of the surface but the surface does not consider the item to be inside it). This is the opposite of "save game friendly", it means the state of the dungeon changes when you save and load, and more to the point, it accomplishes absolutely nothing.
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
Everything seems to be fine as long as the item passes through a champions inventory.
Placing/dropping/interacting with the item didn't crash anything, neither did saving/loading.
Placing/dropping/interacting with the item didn't crash anything, neither did saving/loading.
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
Is there a way to prevent the party from throwing an item from the mouse pointer, but not prevent other functionality such as movement or placement of the item on a surface?
Re: Ask a simple question, get a simple answer
You could make the object's clickable component big enough to catch clicks across the whole screen.Eburt wrote:Is there a way to prevent the party from throwing an item from the mouse pointer, but not prevent other functionality such as movement or placement of the item on a surface?
Quick example:
Code: Select all
altar_1.clickable:setSize(vec(6,6,6))
Re: Ask a simple question, get a simple answer
Thanks Isaac. Yes, that works if the party is in front of something I want to place the item on, but I want to generally prevent them from throwing items at all when certain conditions are met. However, they may have to place items in surfaces, etc. under the same conditions.
I tried attaching something to the party, but its not effective since the onClick hook doesn't do anything - it just goes on to do the normal action of throwing, etc. I could do something like make them drop the item, but that would prevent normal placement. Any ideas?
I tried attaching something to the party, but its not effective since the onClick hook doesn't do anything - it just goes on to do the normal action of throwing, etc. I could do something like make them drop the item, but that would prevent normal placement. Any ideas?
Re: Ask a simple question, get a simple answer
It's not possible to prevent item throws with the user scripting interface except via GameMode.setEnableControls(false) which is obviously not what you want.
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
Here's a more precise answer for you: any 3x3 square in the heightmap mesh that is deformed gets 50 triangles. Any 3x3 square that is not deformed (i.e., any tile where all adjacent tiles have the same height and no noise) gets 2 triangles.minmay wrote:The geometry is not uniformly dense.Isaac wrote:But the question I suppose had was whether or not the geometry is denser in places of deformation, or if the mesh is uniformly dense and just deformed by the heightmap, or not.
*When I said, 'model', I did mean the floor of the entire map; not separate floor models for every tile.
Keep in mind that triangles are really cheap. Performance-wise, the heightmap mesh is almost free on modern GPUs.
So if you completely fill a 32x32 level with heightmapped tiles, and your heightmap+noisemap is such that every tile gets deformed...it's still just 51,200 triangles. For comparison, this scene in Isle of Nex has over 2,100,000 triangles.
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
How can I make a floorsurface (inside dungeon) digable? When I try to dig inside I get the message "you can't dig here"
Re: Ask a simple question, get a simple answer
diggable = true in the tile definition.
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.