Without the trigger, the only thing I've thought about is to put a script in the same tile where the "rest" mapevent is placed,but I think probably It will cause the player to don't sleep or to don't read the script...However you could put the script area around the bed and at least It will be seem that the player has slept.
Yes,this is not a great way to do that,but the best one would be to create (code) that trigger...And sadly I don't know how to code (yet...I haven't time for learning java :c)
Or maybe,make (code too) a dialogue reward with "rest" mapevent features (or just full health to looks like you've slept).
For the meantime I will use the script around as It's simple and and quick...
Now my crazy side will write instead of me:
Using keys,actor conditions and scripts,I believe It's possible to create a "Rest area".
Imagine a
place(room) in AT where you rest.For example,the foaming flask tavern or Prim's Inn.
1.Put the script over a tile or tiles you are sure player will step on.
2.Put in the dialogue some words or whatever you want to say (or nothing if It's possible),plus these dialogue rewards:
2.1: First reward will deactivate the rest mapevent.In that way you won't be able to sleep.Yes,that seems absurd as you want to make the player sleep...But wait a moment please!!
2.2: Second and third rewards will activate two (or more if you need) mapevents. One (or more,depending on the location of the script) will be a key mapevent,which will make you to be stuck in that rest area until you achieve "x" condition,like in Mikhail's house (You have to talk to Mikhail in order to go out).That condition will be to "rest",or what is the same,
stepping on the bed.
That's where third reward comes in! It will consist on a script located in the same place where the old rest map event were placed, that will show the character sleepy thoughts (yourself).In that dialogue you could just add the necessary reward to unlock the key area and the questProgress,gold...whatever.You could also give a chance to player whether sleep or not (and if not,He/She will still be stuck in that place,or...whatever as I said).
Even more,you could add a "Resting" actor condition that will recover all your HP in just one (or more) turn to make that "fake rest" more... real,and change the mapFilter too...Possibilities are wide I think.
Don't forget to create the last script area (Alternatively you can do that in the bed script) that will return things to normality!
Don't forget also to deactivate each script (with rewards) when conversation ends,to don't repeat again the process.
I expect to don't forget anything!
Greetings!
EDIT:
The activate/deactivateMapObjectGroup activates/deactivates an object layer,or a single object? I'm so confused with that.