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
Good point! But then, how would I move the particles toward a specific point (the party's center) ?
Re: Ask a simple question, get a simple answer
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.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
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....
Re: Ask a simple question, get a simple answer
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.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....
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.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
Perfect! (This means I will have to re-upload the orrr3 version if you can wait a little more).
Re: Ask a simple question, get a simple answer
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.
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
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?
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?
Re: Ask a simple question, get a simple answer
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.]
[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.
Re: Ask a simple question, get a simple answer
...Passing only nil arguments, and passing nothing, are the exact same thing.Isaac wrote:I found out that showImage does not like nil passed to it, and yet strangely succeeds if nothing at all is passed
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
I would have thought so... but try it yourself.minmay wrote:...Passing only nil arguments, and passing nothing, are the exact same thing.Isaac wrote:I found out that showImage does not like nil passed to it, and yet strangely succeeds if nothing at all is passed
GameMode.showImage(nil) results in an error.
GameMode.showImage() results in ~a picture, of one of the font sprite sheets. [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.
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.