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
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Ask a simple question, get a simple answer

Post by Rougecorne »

Mmm, i think it's "complicated" to real add an custom item ^^
When i play the game, i have this line:

"Warning ! missing power attack icon: dague_magique"

What is this "icon" ?
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Ask a simple question, get a simple answer

Post by Drakkan »

question - I´d like to have part of the map with cemetry_sky and rest with forest_day_sky. It is possible somehow ? More precisely I just need this fog and effects from cemetary, not necessary whole sky effect. Some clues ?
Breath from the unpromising waters.
Eye of the Atlantis
Vissia
Posts: 1
Joined: Sat Nov 01, 2014 1:24 pm

Re: Ask a simple question, get a simple answer

Post by Vissia »

How can i get the value for the direction my party is facing?
So that i can put that value into a variable, I've tried getDirection() ,
but that doesn't seem to work so I'm kind of lost here... :?
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Ask a simple question, get a simple answer

Post by NutJob »

Vissia wrote:How can i get the value for the direction my party is facing?
So that i can put that value into a variable, I've tried getDirection() ,
but that doesn't seem to work so I'm kind of lost here... :?
calling field party.facing should do the trick. Will return 0 (north),1 ,2, 3 (clockwise).
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Ask a simple question, get a simple answer

Post by NutJob »

Is there an event triggered when the party is actively teleported? (yes, I dare ask this w/o documentation in hopes someone knows beforehand)
User avatar
Matlock19
Posts: 23
Joined: Sun Nov 02, 2014 2:11 am

Re: Ask a simple question, get a simple answer

Post by Matlock19 »

I'm really enjoying Grimrock, especially the editor; I love makin' games so naturally I gravitated to this forum, you guys have a good community. I've learned basic scripts as well as timers/counters, but I still have some simple questions!

1. I have a secret button that displays a hint using a script entity because the secret door it opens is so far away.

Code: Select all

function westhint()

	hudPrint("You hear a faint noise to the west.")
	
end
My problem is that the message is displayed whenever the player clicks the button, even though I have the button set to disableSelf. I only want to display the message once, the first time the button is clicked. How do I do that? Is there a script for "destroy/terminate this script"?

2. I'd like to make some puzzles that require specific items (or item types) being placed in certain places, e.g. a Puzzle Room called "Gluttony" where the player must place food items on four different alcoves, or place a bunch of food in a chest, in order to open a door. Using any item is easy with counters, but how do I make the container require a certain type of item (food, thrown, weapon, etc) or even a specific item (bone blade only)?

3. Pushable blocks. Just pushable blocks. I tried laying pushable block floors as a track, but I still can't push them. Is there a link maybe, to a quick discussion on these blocks?

Thanking you so much in advance,
matlock
GoldenShadowGS
Posts: 168
Joined: Thu Oct 30, 2014 1:56 am

Re: Ask a simple question, get a simple answer

Post by GoldenShadowGS »

Code: Select all

hinthasbeenplayed = false

function westhint()
if hinthasbeenplayed == false then
	hinthasbeenplayed = true
	hudPrint("You hear a faint noise to the west.")
end
end
add a Boolean variable that immediately turns itself off the first time the function is run.

Edit: In case anyone doesn't understand what is happening. A single = sign sets the value of the variable. A double == checks it.
Last edited by GoldenShadowGS on Sun Nov 02, 2014 3:21 am, edited 1 time in total.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Ask a simple question, get a simple answer

Post by Drakkan »

Matlock19 wrote: 3. Pushable blocks. Just pushable blocks. I tried laying pushable block floors as a track, but I still can't push them. Is there a link maybe, to a quick discussion on these blocks?

Thanking you so much in advance,
matlock
dont forget to mark "active" for all block which you want to push. you also need place pushable_block_floor where you want push these blocks on.
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Matlock19
Posts: 23
Joined: Sun Nov 02, 2014 2:11 am

Re: Ask a simple question, get a simple answer

Post by Matlock19 »

GoldenShadowGS wrote: Edit: In case anyone doesn't understand what is happening. A single = sign sets the value of the variable. A double == checks it.
Thanks, that is exactly the kind of stuff I need to learn.

So, for my second question up there, I'm guessing I will need something like "if ContainerItemComponent:item_code == true" to start my script? I'm just taking a wild stab at this, it really has me vexed. :?:
Jackard
Posts: 59
Joined: Thu Oct 30, 2014 7:32 pm

Re: Ask a simple question, get a simple answer

Post by Jackard »

Image

I am making a trap. This lever opens the Door A.

Step onto the plate and Door A behind you crashes shut, forcing you onward.

How do I make this work more than once?
Post Reply