Trying and failing at 2 scripts, not sure why it's being difficult.

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Corpsey
Posts: 5
Joined: Sun Sep 08, 2024 2:08 am

Trying and failing at 2 scripts, not sure why it's being difficult.

Post by Corpsey »

The second script isn't even needed but it bothers me that I can't do it because it makes a fun effect and I was just attempting to integrate timers with the lua alteration I've figured out.

So for the first script, I just wanted a receptor to activate a timer, the timer is connected to spike traps.

However, it gets complicated... there's a pull lever (mostly just for now, because I wanted to make it simple, and the pull lever activates 2 traps (spawner) and a blob, the first task of the whole puzzle is to find a way to dodge the trap missiles and let the blob activate a door (and thus, the traps). Should this door be closed for any reason, I wanted the traps to stop... but there's no "on toggle" for receptor, only on activate so the plan was to make a counter that acts as a bool that starts 0, is 1 when the door is open, and then returns to 0 if activated again. For this puzzle it's not even pertinent that this is functionally able to do this, but in a way it is? I know I can check door state too but not sure how to integrate that. I pretty much want door open = traps door closed = no traps. There's no physical way to close the door from the inside so it expects traps to be active, but I want them to be logical to the door and the door doesn't have a connector.

The other thing I was messing with just before that was about to be timers in general and throwing them into the mix with a blinking light, and I couldn't get that working either. I noticed castle_ceiling_light has some cool particle goodness I could mess with with fadeIn and fadeOut and I just wanted to make the particle itself blink on a timer. Not sure how much I streamed of it but I am on twitch if anyone wants to pm me and give me direct help, but I'm taking a break for now because I got pretty frustrated with it all.

I'm really happy with a map I put together and I just want to capture the logic well from what it's based on, and this was like... step 1.... I need door open = traps engaged, but that door isn't just an I/O switch controlled thing, there's a chance of 'missing' the skillful part.

To break it down:
(Eventually - a spell is cast, for now a pullchain is activated)
This creates a blob you must dodge.
Blob may or may not hit the receptor
If hits, door opens, traps engage hooked into a timer that keeps them pumping quick (0.85s)
If misses, door remains closed, traps remain off.

I hate how simple it is when I write it out because I still have no idea how to implement this. Please help I got pretty fed up with this.... I am actually the worst at programming, I don't know why but it just never clicks in my head what's needed.
Post Reply