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!
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

Good point! But then, how would I move the particles toward a specific point (the party's center) ?
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Oh, come to think of it, you *can* get the position of a node. Use MonsterComponent:shootProjectile() and check the projectile's position.
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
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

You mean MonsterComponent:shootProjectile(projectile, height, attackPower) ? I tried it with "blob",0,0, but it spawns on the floor and height is not optional, so....
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

AndakRainor wrote:You mean MonsterComponent:shootProjectile(projectile, height, attackPower) ? I tried it with "blob",0,0, but it spawns on the floor and height is not optional, so....
The Components page is incomplete, I just updated it. shootProjectile() takes a fourth argument which is the name of the node to shoot the projectile from. Look at the dark acolyte definition for an example.
Last edited by minmay on Sun Aug 21, 2016 5:08 am, edited 1 time in total.
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
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

Perfect! (This means I will have to re-upload the orrr3 version if you can wait a little more).
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Of course, no problem.
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 building an intro cinematic by using GameMode.showImage()

after the last picture is shown it remains on the screen until the player pressed the mouse-key. Is there a way to clear the screen from that picture?
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 »

I haven't seen a way to do this. I was surprised to find that starting a video stream will play the video over the shown image, but not dismiss it. I found out that showImage does not like nil passed to it, and yet strangely succeeds if nothing at all is passed; but it prints an alphabet font instead of an image.
[update: it's a mistake; it is showImage("") that does this.]
Last edited by Isaac on Mon Aug 22, 2016 7:41 pm, edited 2 times in total.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Isaac wrote:I found out that showImage does not like nil passed to it, and yet strangely succeeds if nothing at all is passed
...Passing only nil arguments, and passing nothing, are the exact same thing.
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
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

minmay wrote:
Isaac wrote:I found out that showImage does not like nil passed to it, and yet strangely succeeds if nothing at all is passed
...Passing only nil arguments, and passing nothing, are the exact same thing.
I would have thought so... but try it yourself. :?

GameMode.showImage(nil) results in an error.
GameMode.showImage() results in ~a picture, of one of the font sprite sheets. :shock: [update: it's a mistake; it is showImage("") that does this.]
Clearly the function isn't treating them as the same.

**Of course now that I try it today, it's not giving the same results as last night. :evil:
I'll get a screenshot of it, and find out the why/how of it.

**Got it. It isn't nil or lack, it's the use of an empty string that does it. Not the same as nil; but still very weird.

GameMode.showImage("") results in ~a picture, of one of the font sprite sheets. :shock:
Post Reply