Lua scripts
Lua scripts
Guys thanks for the editor great thing, thanks for nice guide through how the editor works. BUT i dont thing you gave us enough info about the functions in your game. I mean you gave us documentation to lua languague its ok BUT if i know programming and i want to activate the teleport and make it visible with script how can i know which function makes teleport visible or which activates it? Dont you have some list of all functions you used in scripts for ex to activate trigersteleports etc... Or the best thing would be if you give us some examples how you programed teleport puzzles or puzzles with fireballs, pits etc.
Re: Lua scripts
You're looking for this
http://www.grimrock.net/modding/
This one more specifically.
http://www.grimrock.net/modding/scripting-reference/
http://www.grimrock.net/modding/
This one more specifically.
http://www.grimrock.net/modding/scripting-reference/
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Lua scripts
Oh man great great SCRIPTING REFERENCE is what i really needed but i didnt see it
)))))
Re: Lua scripts
That's okay. I fail to read a lot of what's already there all the time.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Lua scripts
Also look at this thread:
viewtopic.php?f=14&t=3099
viewtopic.php?f=14&t=3099
Finished Dungeons - complete mods to play
Re: Lua scripts
Can somebody help?
1)
How does IF work when i have more than one lines of code? Is this right? For example:
If a==2 then
door1:close()
door2:close()
end
2)
I saw this code in reference:
Party:shakeCamera(intensity, duration)
I tried: Party:shakeCamera(1, 2) but it gave me an error: attempt to index global party a nil value. Why is that?
3)
Can you give me example of code that removes an object from ALTAR? I need to make this object to disappear. For example a key or something that player puts on altar
4) What is the code for having a room where will spawn a snail until there will be max 5 snails than it stops. Can u help?
Half solution: I made a timer which activates a spawner after a while and each time counter counts +1 but i dont know how to decrease counter when snail dies
1)
How does IF work when i have more than one lines of code? Is this right? For example:
If a==2 then
door1:close()
door2:close()
end
2)
I saw this code in reference:
Party:shakeCamera(intensity, duration)
I tried: Party:shakeCamera(1, 2) but it gave me an error: attempt to index global party a nil value. Why is that?
3)
Can you give me example of code that removes an object from ALTAR? I need to make this object to disappear. For example a key or something that player puts on altar
4) What is the code for having a room where will spawn a snail until there will be max 5 snails than it stops. Can u help?
Half solution: I made a timer which activates a spawner after a while and each time counter counts +1 but i dont know how to decrease counter when snail dies
Last edited by tantalan on Wed Sep 19, 2012 9:59 pm, edited 2 times in total.
Re: Lua scripts
1) I think it would have to be:
if a == 2 then
but otherwise the doors should close fine
2) don't know about the shakecamera
3 I believe we currently can't removing items from alcoves or altars
if a == 2 then
but otherwise the doors should close fine
2) don't know about the shakecamera
3 I believe we currently can't removing items from alcoves or altars
Finished Dungeons - complete mods to play
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Lua scripts
2) you have to use a lower case "p" in party, then it will work.tantalan wrote: 2)
I saw this code in reference:
Party:shakeCamera(intensity, duration)
I tried: Party:shakeCamera(1, 2) but it gave me an error: attempt to index global party a nil value. Why is that?
Re: Lua scripts
You can place a hidden plate, teleport ( deactivated and invisible), and altar, all on the same square, run a connector from the plate to a timer which activates the teleport, and it will remove the object from the altar, sending it wherever.Komag wrote:1)
3 I believe we currently can't removing items from alcoves or altars
Re: Lua scripts
Thanks for advices. Do you know how to make a moving teleport? I know probably using timer but how to create and remove teleport from one place to another?
