Page 370 of 400

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 24, 2020 1:48 am
by Zo Kath Ra
ratman wrote: Thu Dec 24, 2020 1:01 am Two more questions: first, if the player creates a party, changes the position of champion 1 and champion 2, then imports that party into a different mod, would the game remember the original Ordinal or make a new one based on the party's formation when it was imported?
You can test this yourself:

1) Start a new game with the default party

2) Run this code in the console:

Code: Select all

for i = 1, 4 do 
	local champion = party.party:getChampionByOrdinal(i) 
	print(i, champion:getName()) 
end 
3) Change the party order

4) Create a quicksave

5) Go back to the main menu and start a different mod, importing the party from the quicksave

6) Run the code from step 2 again

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 02, 2021 11:51 pm
by THOM
Is there a way to make a socket accepting all kinds of an item but triggers an event only when one specific item is inserted? Means: you can put in e.g. gems of all colors but only red gems opens the door.

All solutions I can find are
- socket accepts all gems and triggers event with all of them
- socket accepts only red gems and refuses all others completely

Re: Ask a simple question, get a simple answer

Posted: Sun Jan 03, 2021 12:10 am
by minmay
Returning false from the socket's onInsertItem hook (not the onAcceptItem hook) should prevent its onInsertItem connectors from triggering, so you could use that.

Alternatively, if you'd rather do this without changing the item definition, just connect the socket to a script entity instead of directly to the door, and do this:

Code: Select all

function connectTheSocketToThisFunction(socket, item)
	if item and item.go.name == "red_gem" then
		your_door.controller:open()
	end
end

Re: Ask a simple question, get a simple answer

Posted: Sun Jan 03, 2021 1:27 am
by THOM
I choosed the "return false in onInsertItem" solution. Works perfect.
Never expected that this could do the trick.
Thank you.

Re: Ask a simple question, get a simple answer

Posted: Fri Jan 08, 2021 5:53 pm
by kelly1111
Phitt made an elevator in his the mine of Malan Veal mod. The elevator is essentialy a door (MineElevator.model) A very large slab of rock that moves down .. giving the impression that you are in an elevator. I don't really know how to formulate my question correctly. But I'll try. When I import that model into blender and export it again. It goes from 6.484 kb to 3.875kb ... and I havent modified a thing...

Then it stops working ingame. that is, it only moves the lenght of that a normal door would move up and down. When I copy phitt's model directly from his source files (not load it into blender) ..it is working just fine.

What does blender change when I export it ?

I am asking because I am trying to make my own similar elevator...

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 09, 2021 10:06 am
by maneus
Why not make your own animation in Blender for your elevator?

Is the shading of the faces smooth or flat after exporting? (because of the new filesize)

I for myself had often problems with importing animations in blender because of the new nodes the Importer creates (game_matrix, RootNode etc.). The animation dont have these nodes in the animation, so it often was a mess (for me). :lol:

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 09, 2021 2:26 pm
by kelly1111
I think I will finally have to take a look at how to animate things and import them.... :)

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 09, 2021 4:27 pm
by ratman
I don't know anything about modeling or animation, but on Nexus there is the Stairs and Elevator Demo that has some scripts that simulate the 'elevator' effect, and you could probably use it on your own model.

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 09, 2021 4:56 pm
by Isaac
kelly1111 wrote: Sat Jan 09, 2021 2:26 pm I think I will finally have to take a look at how to animate things and import them.... :)
Here are links to three beginner Blender tutorials, and how to install the Blender plugin for importing Grimrock models.
SpoilerShow
*Note: Links are intentionally for an older version of Blender. The LoG exporter requires [at most] Blender version 2.72.

Absolute basics of Blender [2.78c]: https://www.youtube.com/watch?v=d5luANNKuEc

Basic modeling with Blender [2.78c]: https://www.youtube.com/watch?v=ICBP-7x7Chc

Basic animation with Blender [2.78c]: https://www.youtube.com/watch?v=GM1Fc-NTDsg
____________________________
Installing Bitcopy's Grimrock 1&2 model/animation import/export plugin for Blender 2.72.
[Updated by minmay!]


Forum post with the file link: http://www.grimrock.net/forum/viewtopic ... 62#p119735

Save the linked zip file (to your desktop), and from within Blender, open the user preferences, and select 'Install from file'.
SpoilerShow
Image
Select the zip file that was saved to your desktop.

New import/export options for Grimrock model and animation files should now exist in the Blender Import and Export menus.
SpoilerShow
Image

Re: Ask a simple question, get a simple answer

Posted: Sat Jan 09, 2021 5:59 pm
by kelly1111
thanks Isaac. I have it set up now. I will take a look at the tutorials