Page 1 of 1

Wall text and custom sounds

Posted: Mon Oct 22, 2012 8:55 pm
by TheKuu
Is there a way to play a sound when a wall text is activated ? Perhaps there is a clever way to place a hidden button that spans across the entire wall. Also, is it possible to pause/resume the music, like it does when you rest ?

Re: Wall text and custom sounds

Posted: Mon Oct 22, 2012 9:48 pm
by DarkCowboy
I'm pretty sure you can do it by scripting it.

I'm still new at this and still learning, so this example is probably not 100% accurate.
Not too sure about hook names, but in general something like this:

function revealWallText ()
spawn('walltext', levelcoordinate, x-coordinate, y-coordinate, facing)
playSound('soundname')
end

And then just hook it up with your preferred trigger.

It's a pretty rough example, but some of the more adept scripters will probably swoop by, to fill in the blanks and correct my mistakes.
Just a rough idea in my head how I would go about it.

Edit: Sorry about a completely useless answer. I thought you wanted sound to play when revealing walltext, not activating it.

Re: Wall text and custom sounds

Posted: Mon Oct 22, 2012 10:15 pm
by TheKuu
No problem, thanks for the reply. I'm just looking to have a sound play when the player clicks on the wall text that's already spawned there.

Re: Wall text and custom sounds

Posted: Tue Oct 23, 2012 9:44 am
by djoldgames
TheKuu wrote:No problem, thanks for the reply. I'm just looking to have a sound play when the player clicks on the wall text that's already spawned there.
Definitely not ;( Because the walltext entity doesn't any hook.
We need some sort of onClick() hook added from the developers in the future...