How to discover secret and play sound etc?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
DrMadolite
Posts: 27
Joined: Mon Nov 05, 2012 10:26 pm
Location: Norway

How to discover secret and play sound etc?

Post by DrMadolite »

I got a simple question, but it seems like there's no answer to it found anywhere. Maybe I'm just blind, but here it is:

How do you script a simple event of finding a secret, adding it to the game map, getting the message "Secret Found" and having the "secret" sound play? I understand the algorithm, but I'm not too familiar with Lua. Could someone please give an example script of how to do it?

Thanks in advance. Also, is there any way of opening the official LoG dungeon in the editor, in order to see how the devs have done things? It'd help a lot.
The torch is your friend.
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: How to discover secret and play sound etc?

Post by Grimwold »

the easiest thing to do is place a Secret entity using the editor, and in the same space (or nearby) place a hidden pressure plate.
Create a connection from the plate to the secret with the activate action and it should work.
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: How to discover secret and play sound etc?

Post by HaunterV »

i read somewhere you have to put another secret symbol somewhere else otherwise you end up with a 1/0 secrets found.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
User avatar
DrMadolite
Posts: 27
Joined: Mon Nov 05, 2012 10:26 pm
Location: Norway

Re: How to discover secret and play sound etc?

Post by DrMadolite »

Grimwold wrote:the easiest thing to do is place a Secret entity using the editor, and in the same space (or nearby) place a hidden pressure plate.
Create a connection from the plate to the secret with the activate action and it should work.
I tried this and it worked perfectly. Thanks for the input. I do want to find out more though, but I'll check out the Lua scripting and look around some more. Specifically, I'd like to add "X experience gained" to the text that appears, and similar.
HaunterV wrote:i read somewhere you have to put another secret symbol somewhere else otherwise you end up with a 1/0 secrets found.
I'm not familiar with this problem, but I'll try your solution if it pops up. Thanks.
The torch is your friend.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: How to discover secret and play sound etc?

Post by msyblade »

place a "Secret" entity, then a script entity and put this into it:

Code: Select all

function exp()   
hudPrint ("Gained 250 exp.")
 for i=1,4 do  party:getChampion(i):gainExp(250)


    end
end
Then connect a pad to both :) Your connector must be activate once or players will have an unlimited exp. cheat
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

Re: How to discover secret and play sound etc?

Post by antti »

DrMadolite wrote:Thanks in advance. Also, is there any way of opening the official LoG dungeon in the editor, in order to see how the devs have done things? It'd help a lot.
The main dungeon was made in the days before the dungeon editor existed so it's not compatible with dungeon editor.
Steven Seagal of gaming industry
User avatar
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to discover secret and play sound etc?

Post by Komag »

...But soon you may be able to see how someone else has done things
Finished Dungeons - complete mods to play
User avatar
DrMadolite
Posts: 27
Joined: Mon Nov 05, 2012 10:26 pm
Location: Norway

Re: How to discover secret and play sound etc?

Post by DrMadolite »

Some nice feedback here, and I'll try out that script as well (msyblade). Thanks again, peeps. :)
The torch is your friend.
Post Reply