Ask a simple question, get a simple answer

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!
Eburt
Posts: 69
Joined: Thu Feb 05, 2015 5:44 am

Re: Ask a simple question, get a simple answer

Post by Eburt »

Thanks minmay. After taking a quick look at a few, it appears they are all spawnburst type particles (or maybe some very short durations). It doesn't look like anything was intended to work indefinitely and as a result camera movements weren't an issue (but please point out if I missed something here). There isn't a way to change the offset of the particle system to move with a free-look camera, is there?
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Screen effects already move with the camera. Free-looking transforms the entire party object and therefore all of its components. Perhaps you wanted to emit particles to object space but forgot to add objectSpace = true to the emitter 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.
Eburt
Posts: 69
Joined: Thu Feb 05, 2015 5:44 am

Re: Ask a simple question, get a simple answer

Post by Eburt »

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?
User avatar
The cube
Posts: 94
Joined: Tue Apr 23, 2013 6:09 pm
Location: Barren Desert

Re: Ask a simple question, get a simple answer

Post by The cube »

How to give the party xp?
Last edited by The cube on Wed Apr 15, 2015 4:24 pm, edited 1 time in total.
User avatar
The cube
Posts: 94
Joined: Tue Apr 23, 2013 6:09 pm
Location: Barren Desert

Re: Ask a simple question, get a simple answer

Post by The cube »

AndakRainor wrote:
The cube wrote:How to gift the party xp?
http://www.grimrock.net/modding/scripti ... /#Champion
Champion:gainExp(xp)
Ohh i was looking at the party part of scripting reference >_>

This time i checked the reference, How to remove items from an alcove? There is no alcove component at all.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Alcoves use SurfaceComponent.
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.
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

I am trying to port over a script from my LoG1 mod, but the following line doen't seem to work anymore:

Code: Select all

if sender.id == "wall_button_2" then
...probably because the "sender.id" concept doesn't exist anymore. I presume I have to exchange it somehow with "go." but all my try outs fail.

someone an idea?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

THOM wrote:I am trying to port over a script from my LoG1 mod, but the following line doen't seem to work anymore:

Code: Select all

if sender.id == "wall_button_2" then
...probably because the "sender.id" concept doesn't exist anymore. I presume I have to exchange it somehow with "go." but all my try outs fail.

someone an idea?
Using sender.go.id should work. What else are you doing in this function?

* Attach three buttons to this script (with their default names), and all should hudPrint their id, but wall_button_2 should also play the sound for a secret.

Code: Select all

function buttons(sender)
	hudPrint(tostring(sender.go.id))
	
	if sender.go.id == "wall_button_2" then
		playSound("secret")
	end
end
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Isaac wrote: What else are you doing in this function?
It's an adaption from this script:
http://54.158.249.29/forum/viewtopic.ph ... 6&start=10

And now it works perfect! Thank You!!
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply