Position of Socket component

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Position of Socket component

Post by AdrTru »

@GameMakers:

Can I ask you about adding :setOffset and :setRotation functions for Socket commponent? Please.


I want to create some object like LOG1 MultiAlcoveManager viewtopic.php?f=14&t=5314&p=58238&hilit ... ger#p58238.
In LOG1 system I spawn for every inserted object new alcove object (this system was very objects messy ).
I was lucky for LOG2 component system, becouse there is possible make different definitions in game. But for socket component it isnt possible.
---
I known problems with combination of surface and socked component, but I solved it.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Position of Socket component

Post by QuintinStone »

I added a daemon face with eye sockets in my game. My first version tried to have 2 socket components as part of the daemon face object. That didn't work because the first socket component always got ignored by the game. Everything put into the first socket clickable area ended up being put into the second socket.

I just decided it was hardcoded to allow only 1 socket component per object and instead made the sockets separate objects with no models of their own.
Crypt of Zulfar
User avatar
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Position of Socket component

Post by AdrTru »

Its a problem.
My idea for this socketed object is make surface object as alcove.
Check inserted object to surface, and in code make socket and clickable component.
Next step is move item to this new socket and destroy socked. (Item stay in socket position).
For this item is missing onRemove hook, but is possible to take it.
Removing this item must be managed by party hook.

This procedure worked, only isnt possible to make ingame socket in custom position.

EDIT:
description above is bad. This procedure dont worked correctly.
I make on system where is redefined WorldPosition of items in surface. This Items stay in surface only is changed this position.
This system looks good.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
Post Reply