Page 1 of 1

Walltext, custom sound onClick [solved]

Posted: Fri Oct 31, 2014 7:05 pm
by Aisuu
Hi, Iam trying to do something like this guy from LOG1.

viewtopic.php?f=14&t=3851

Simply, I need to play custom sound when player click on wall text.
Is it possible now in LOG2 please? I tryed everything, but Iam not very good in LUA.

Re: Walltext, custom sound onClick

Posted: Fri Oct 31, 2014 7:07 pm
by Doridion

Re: Walltext, custom sound onClick

Posted: Fri Oct 31, 2014 7:13 pm
by Prozail
make a script_entity and put in the following (replacing "dungeon_wall_text_1" with the id of your text-object)

Code: Select all

dungeon_wall_text_1.clickable:addConnector("onClick",self.go.id,"iclickedthewall")
function iclickedthewall(sender)
	playSound("secret")
end

Re: Walltext, custom sound onClick

Posted: Fri Oct 31, 2014 7:32 pm
by Aisuu
Great, that work perfectly. Thx Prozail, you are my hero :)