Page 6 of 396

Re: Ask a simple question, get a simple answer

Posted: Sat Nov 01, 2014 2:27 am
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" ?

Re: Ask a simple question, get a simple answer

Posted: Sat Nov 01, 2014 3:39 am
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 ?

Re: Ask a simple question, get a simple answer

Posted: Sat Nov 01, 2014 1:34 pm
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... :?

Re: Ask a simple question, get a simple answer

Posted: Sat Nov 01, 2014 3:00 pm
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).

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 2:38 am
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)

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 2:42 am
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

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 3:02 am
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.

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 3:09 am
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.

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 3:44 am
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. :?:

Re: Ask a simple question, get a simple answer

Posted: Sun Nov 02, 2014 5:24 am
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?