Page 1 of 2

Can we haz traditional triggers?

Posted: Sat Sep 15, 2012 3:03 am
by Scorcher24
Invisible script triggers that can be placed on the ground and connect to a script that is launched when the party or a monster touches it.
I would connect 2 hooks that can be overriden in the script:

Code: Select all

OnTouch
OnEndTouch
The functions should receive the id of the monster or "party" if it is the player party.
This way it would be way easier to do things like mood change of the dungeon, spawns when you walk by somewhere or sounds etc.
If this is already possible, then I did not see it :D.

Re: Can we haz traditional triggers?

Posted: Sat Sep 15, 2012 3:33 am
by Komag
you can trigger stuff with invisible pressure plates, with the right scripts connected they can probably do anything you're talking about

Re: Can we haz traditional triggers?

Posted: Sat Sep 15, 2012 9:49 am
by Scorcher24
Komag wrote:you can trigger stuff with invisible pressure plates, with the right scripts connected they can probably do anything you're talking about
Yeah, but it takes 2 entities and there is no "invisible" setting for the pressure plates. So you have to script that either.
Anyway, just a suggestion.

Re: Can we haz traditional triggers?

Posted: Sat Sep 15, 2012 10:13 am
by Shroom
There is a pressure_plate_hidden object - just set activation to silent

Re: Can we haz traditional triggers?

Posted: Sat Sep 15, 2012 10:14 am
by Montis
There's a hidden pressure plate object that can be made completely invisible and unhearable for the player. Try searching for it in the asset browser.

Well, Shroom beat me to it.

Re: Can we haz traditional triggers?

Posted: Tue Sep 18, 2012 8:06 pm
by spacecookie
I'm here again with my nooby question. Sorry.

Is it possible to remove a block with a hidden pressure plate? I've set a block in a passageway, but only want it to be temporary, so I've inserted an invisible/silent pressure plate, activated by party only, the next step after the block.

That's to give the party a safe space at first entering the dungeon, but once you're there, you're there >_<.

Re: Can we haz traditional triggers?

Posted: Tue Sep 18, 2012 8:58 pm
by zeltak
spacecookie wrote:I'm here again with my nooby question. Sorry.

Is it possible to remove a block with a hidden pressure plate? I've set a block in a passageway, but only want it to be temporary, so I've inserted an invisible/silent pressure plate, activated by party only, the next step after the block.

That's to give the party a safe space at first entering the dungeon, but once you're there, you're there >_<.
Why can't you use secret doors for that?

Re: Can we haz traditional triggers?

Posted: Tue Sep 18, 2012 10:03 pm
by spacecookie
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.

Re: Can we haz traditional triggers?

Posted: Tue Sep 18, 2012 10:12 pm
by Komag
I can't remember if I read that you can or can't remove monster blockers. But you could still use a secret door and just script it to be up or teleport away before the party can see it.
mydoor:setDoorState("open")

Re: Can we haz traditional triggers?

Posted: Tue Sep 18, 2012 10:23 pm
by spacecookie
Thank you, it's just that in the documentation, the commands that go with blockers include Blocker:activate() Blocker:deactivate() and Blocker:toggle()

So I put my blocker in the corner, and the pad just beyond. Then I linked the pad to the blocker, and ... nothing. Though the text in the luascrip file doesn't appear like that, it's just the auto generated script there for a pad and what it's linked to activate.

While testing I get "Warning! entity blocker_1 does not respond to event"

I wanted the player to walk past the blocker before deactivating it too.