LUA clueless, need help.

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
utopia570
Posts: 5
Joined: Sun Mar 22, 2015 6:50 pm

LUA clueless, need help.

Post by utopia570 »

Greetings and thank you for coming to my aid!

I am very new to programming, scripting, etc. I know very little about any of this stuff and only took one class in college for VB before dropping out. So here's my issue:

I am trying to make a projectile (small fireball) spawn on pressure plate activation and then move down a corridor so that the party will get hit unless they side step into little shoot offs I have provided. Each plate will need to be activated only once and there are four in the corridor. I would like very much for each fireball to come out of the same location at the far end of the corridor.

FBxxxxxxxxxxxxPPxxxxxxPPxxxxxxPPxxxxxxPPxxxxxxSTART
||||||||||||||xx||||||xx||||||xx||||||xx|||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||

FB=Fireball PP=Pressure plate x=empty space |=wall

Sorry for my crude explanation, poor illustration, and lack of scripting knowledge. I know what I want to do but it is frustrating that I do not know how to do what I want.
Thank you again for any help.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: LUA clueless, need help.

Post by minmay »

Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: LUA clueless, need help.

Post by Drakkan »

utopia570 wrote:Greetings and thank you for coming to my aid!

I am very new to programming, scripting, etc. I know very little about any of this stuff and only took one class in college for VB before dropping out. So here's my issue:

I am trying to make a projectile (small fireball) spawn on pressure plate activation and then move down a corridor so that the party will get hit unless they side step into little shoot offs I have provided. Each plate will need to be activated only once and there are four in the corridor. I would like very much for each fireball to come out of the same location at the far end of the corridor.

FBxxxxxxxxxxxxPPxxxxxxPPxxxxxxPPxxxxxxPPxxxxxxSTART
||||||||||||||xx||||||xx||||||xx||||||xx|||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||

FB=Fireball PP=Pressure plate x=empty space |=wall

Sorry for my crude explanation, poor illustration, and lack of scripting knowledge. I know what I want to do but it is frustrating that I do not know how to do what I want.
Thank you again for any help.
Hi, there is no reason to script something for this, all could be done directly. Just use several pressure plates connected to a object called spawner (set to fireball).
Breath from the unpromising waters.
Eye of the Atlantis
utopia570
Posts: 5
Joined: Sun Mar 22, 2015 6:50 pm

Re: LUA clueless, need help.

Post by utopia570 »

Yeah if I had the time to learn a whole new language I would have done it instead of asking for help. Thanks anyway for the lazy comment.
utopia570
Posts: 5
Joined: Sun Mar 22, 2015 6:50 pm

Re: LUA clueless, need help.

Post by utopia570 »

[/quote]
Hi, there is no reason to script something for this, all could be done directly. Just use several pressure plates connected to a object called spawner (set to fireball).[/quote]

Thank you very much! I did see the spawner object but I thought it was for enemies only. Now I understand why I couldn't find a script online for this.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: LUA clueless, need help.

Post by minmay »

utopia570 wrote:
Yeah if I had the time to learn a whole new language I would have done it instead of asking for help. Thanks anyway for the lazy comment.
I'm not sure how you expect to use Lua without learning Lua.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: LUA clueless, need help.

Post by Azel »

utopia570 wrote:
Yeah if I had the time to learn a whole new language I would have done it instead of asking for help. Thanks anyway for the lazy comment.
Indeed, there are plenty of code references available that allow you to plug n' play features without having to actually learn a new Language. Plus, as Drakkan pointed out, a lot can be accomplished using standard asset combinations, like triggers tied to Timers, Spawners, and Counters. Oh and pay no mind to minmay, he likes to Troll people who don't memorize the Scripting Reference. Plenty of other folks are willing to help you out without trying to make you feel dumb, so ask away. Happy Mod'ing!
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: LUA clueless, need help.

Post by Isaac »

Thanks for the link. Image

@utopia570:
There are many here that will offer insight, some that will offer to script things outright; but I suspect that most would like that insight to rub off on the asker. Unless this is to be your only mod, it would be useful to keep the link to the Lua reference, and to read (or view) a tutorial or two on Lua; to become comfortable at reading simple scripts. There are basic common tasks that are trivial via script, but overly complex and tedious when done using connectors and timers. Grimrock uses a subset of of Lua, and what one uses most often, is a subset of that.

One could get the hang of simple scripts in less than a week of spare time intermittent study, and it will improve your mods, and what you can achieve in them. The unintuitive 'gotchas' of Grimrock scripting are easy to get help with, and are likely to be volunteered before before you know to ask about them. A basic familiarity with Lua will better allow you to use the scripts that others might give to you.

Welcome to the forums. ;)
utopia570
Posts: 5
Joined: Sun Mar 22, 2015 6:50 pm

Re: LUA clueless, need help.

Post by utopia570 »

Hello all!

Thank you all for your helpful and friendly posts. I have been looking at LoG 1 & 2 for quite sometime, and even played a bit on a friend's game. I am also a veteran of Dungeon Master, Eye of the Beholder 1,2, and 3. When I saw this had an editor, I fell in love all over again with the genre, and my decades long interest to make video games. Now, you might say well if you feel that strongly about it why not learn programming, graphic design, story writting, etc etc etc. Well I have no ambition outside of what already consumes my time, work, playing housewife, chauffeur for family, etc. I would love very much to do what I want instead of what everyone else wants. This brings me back to what I do love about LoG's editor, its quite simply put the easiest game crafting tool I have ever seen. Unfortunately, like RPG Maker, in order to make a truly unforgettable gaming experience you must learn Lua. I simply do not have more than a few minutes a day with which to craft a tiny fraction of a level and having the ability to say, slap a pre-constructed line of code in when I need it would be ideal. Surely there are general scripts in existence that could be made available to a casual developer such as myself. I would even be willing to pay someone to construct custom code for me if need be.

Again thank you all for your help and welcoming me to your community. I will definitely drop a line if I need any further help. Thanks a bunch!
utopia570
Posts: 5
Joined: Sun Mar 22, 2015 6:50 pm

Re: LUA clueless, need help.

Post by utopia570 »

Ok so for now, my only other question would be, is it possible to edit someone else's dungeon? I have 0 intention of reuploading a modified dungeon or "ruining" someone else's work. I simply want to alter a dungeon to my play style. It would be just an offline change for my own purposes. Thank you.
Post Reply