Can we haz traditional triggers?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Can we haz traditional triggers?

Post by Komag »

hmm, not sure how that works then, I haven't actually used blockers myself yet. If I get a chance I'll try to test it tonight or tomorrow
Finished Dungeons - complete mods to play
User avatar
spacecookie
Posts: 26
Joined: Tue Sep 18, 2012 4:23 pm
Location: SW Ingalund, innit.
Contact:

Re: Can we haz traditional triggers?

Post by spacecookie »

Thank you very much.

I'm new to lua scripting, and I work more visually too, so I work from within the editor trying to set it up that way, but then I've found myself turn to scripting to set up the mechanics that don't work via the editor's more visual way of doing things.

I'm just not so confident that I'm doing it right via scripting, but at least it's teaching me ^_^
Ixnatifual

Re: Can we haz traditional triggers?

Post by Ixnatifual »

I have a plate in my dungeon where there's a pit, closed by pressure plate next to it. I noticed my monsters would step on the plate and then gladly proceed to the closed pit square, which would then open up as they left the pressure plate.

So I put a blocker on the pit, but noticed that if the party had placed an item on the plate and stood on the closed pit, monsters would mostly ignore them even when standing adjacent. So I put up three hidden pressure plates. One on the blocker square, and one on either side of it. This way, when the party stands on the blocker, it won't block. When they move off the blocker, it'll activate again to prevent the monsters going onto that square.

I made two lua scripts.

This one is activated when the party steps on the hidden pressure plate on the blocker square:

Code: Select all

function deactivatePitBlocker()
	blocker_1:deactivate()
end
This one is activated when the party steps on either pressure plate next to the blocker square:

Code: Select all

function activatePitBlocker()
	blocker_1:activate()
endd
I suspect you can use a similar setup to solve your problem. In hindsight think It'd be best make the second script trigger when deactivating the blocker square hidden pressure plate.
Ixnatifual

Re: Can we haz traditional triggers?

Post by Ixnatifual »

Ixnatifual wrote:In hindsight think It'd be best make the second script trigger when deactivating the blocker square hidden pressure plate.
Yep. Now it also acts properly if the player is dumb enough to remove the item from the pressure plate while standing on the pit. :twisted:
User avatar
Shroom
Posts: 98
Joined: Tue Mar 27, 2012 6:37 pm
Location: UK

Re: Can we haz traditional triggers?

Post by Shroom »

spacecookie wrote:Well I want it set up so it's a passage way, just after the party begins. They're walking along and turn a corner, and that's where the monsters are, and unbeknownst to the player, the monsters are now free to wander all over. I don't want to add secret doors and such this early in the game. I just need a temporary blocker so the players are safe until the point of walking around the corner.
Alternatively, if the corridor is the only way along, set the first monster to 'Guard' in the editor and it wont move until it sees the party - those behind it can be wandering happily but wont get past this one - after the party 'trigger' it - everything is then able to move freely
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Can we haz traditional triggers?

Post by Komag »

apparently they just fixed some issues with the new beta 1.2.9
- blockers' initial state can be configured in the inspector
- blockers can be activated, deactivated and toggled with connectors
maybe this will solve your issue - just try again the setup you first wanted
Finished Dungeons - complete mods to play
User avatar
spacecookie
Posts: 26
Joined: Tue Sep 18, 2012 4:23 pm
Location: SW Ingalund, innit.
Contact:

Re: Can we haz traditional triggers?

Post by spacecookie »

Thank you. It works now ^_^
Post Reply