Re: Wagtunes' Modding Questions
Posted: Wed May 12, 2021 8:53 pm
Okay, I have a sticky wicket here and I don't know how to fix it.
It's a simple enough action that I didn't even need a script for it. Party walks into a corner. On the right side is an alcove with a key. On the left side is a lever. The key is unimportant as far as making the action work. All the party has to do is pull the lever and a teleporter, which is invisible, teleports them to another location. No problem.
The problem is this.
That key comes into play down the road. So eventually, if they don't take it (maybe they missed seeing the alcove) they need to come back to get it. But if they walk back into that little corner, the teleporter is still active. So once they enter, they get teleported back to the other location before they can even try to get the key.
So, how can I deactivate that teleporter after it's been activated and after the party has been teleported? I tried added another action to the lever to deactivate the teleporter after activating it but that makes it so that the party never teleports at all.
If I create a script that the lever calls after activating it to deactivate the teleporter in the script, will that work or will it have the same effect of what I did with adding connectors? If it has the same effect, then I'm going to assume I'm going to need some kind of timer to wait several seconds before turning off that teleporter.
Any ideas?
The reason I'm asking is because in order to even get to this point, I have to go through a lot of dungeon area. The alcove and lever aren't revealed until other things happen. The process itself to get to this point is quite complex. So if what I try doesn't work, I then have to go through the whole process again, something which I'd like to avoid if possible. So if someone knows a definitive solution (I'm sure I'll figure it out eventually) that would be really helpful.
Thanks.
It's a simple enough action that I didn't even need a script for it. Party walks into a corner. On the right side is an alcove with a key. On the left side is a lever. The key is unimportant as far as making the action work. All the party has to do is pull the lever and a teleporter, which is invisible, teleports them to another location. No problem.
The problem is this.
That key comes into play down the road. So eventually, if they don't take it (maybe they missed seeing the alcove) they need to come back to get it. But if they walk back into that little corner, the teleporter is still active. So once they enter, they get teleported back to the other location before they can even try to get the key.
So, how can I deactivate that teleporter after it's been activated and after the party has been teleported? I tried added another action to the lever to deactivate the teleporter after activating it but that makes it so that the party never teleports at all.
If I create a script that the lever calls after activating it to deactivate the teleporter in the script, will that work or will it have the same effect of what I did with adding connectors? If it has the same effect, then I'm going to assume I'm going to need some kind of timer to wait several seconds before turning off that teleporter.
Any ideas?
The reason I'm asking is because in order to even get to this point, I have to go through a lot of dungeon area. The alcove and lever aren't revealed until other things happen. The process itself to get to this point is quite complex. So if what I try doesn't work, I then have to go through the whole process again, something which I'd like to avoid if possible. So if someone knows a definitive solution (I'm sure I'll figure it out eventually) that would be really helpful.
Thanks.