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.
How to discover secret and play sound etc?
- DrMadolite
- Posts: 27
- Joined: Mon Nov 05, 2012 10:26 pm
- Location: Norway
How to discover secret and play sound etc?
The torch is your friend.
Re: How to discover secret and play sound etc?
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.
Create a connection from the plate to the secret with the activate action and it should work.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: How to discover secret and play sound etc?
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
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
- DrMadolite
- Posts: 27
- Joined: Mon Nov 05, 2012 10:26 pm
- Location: Norway
Re: How to discover secret and play sound etc?
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.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'm not familiar with this problem, but I'll try your solution if it pops up. Thanks.HaunterV wrote:i read somewhere you have to put another secret symbol somewhere else otherwise you end up with a 1/0 secrets found.
The torch is your friend.
Re: How to discover secret and play sound etc?
place a "Secret" entity, then a script entity and put this into it:
Then connect a pad to both Your connector must be activate once or players will have an unlimited exp. cheat
Code: Select all
function exp()
hudPrint ("Gained 250 exp.")
for i=1,4 do party:getChampion(i):gainExp(250)
end
end
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
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: How to discover secret and play sound etc?
The main dungeon was made in the days before the dungeon editor existed so it's not compatible with dungeon editor.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.
Steven Seagal of gaming industry
Re: How to discover secret and play sound etc?
...But soon you may be able to see how someone else has done things
Finished Dungeons - complete mods to play
- DrMadolite
- Posts: 27
- Joined: Mon Nov 05, 2012 10:26 pm
- Location: Norway
Re: How to discover secret and play sound etc?
Some nice feedback here, and I'll try out that script as well (msyblade). Thanks again, peeps.
The torch is your friend.