Lady Rowena on 7/12/2013 at 13:42
In short, I have no clue on how to use this script. I wish to freeze Garrett as soon as he enters a certain room. He should stay frozen for say, 10 seconds. This has to happen only once, the 1st time he enters the room.
I tried putting the script on the room, and "freeze_0.0" in the design notes, but it doesn't work. BTW, the instructions say: "An arbitrary value can be specified with a ScriptControl message". What is a ScriptControl message? :confused::o
gigagooga on 7/12/2013 at 14:18
it's been quite long time since i last time used that, but i think i didn't fiddle with design notes at all and just simply had the freeze script on marker with CD link to player, which was triggered upon entering a room. Then i had timer which was routed through inverter to freezetrap, so player would "melt" again after a while, and it worked just fine.
Although it was some old script (tnhscript if i remember right), and i have no idea if it has been updated since then to work some other way or something.
darthsLair on 7/12/2013 at 14:38
TrapKillEvents is much more reliable and disables the players keyboard if that is what you want.
(
http://dromed.whoopdedo.org/tnhscript/trapkillevents) http://dromed.whoopdedo.org/tnhscript/trapkillevents
Make sure your tnhscript is loaded.
1.create a marker-name it for reference
2.add to script,first slot:TrapKillEvents
3.add editor's design note:"event_mask=1000" This will allow mouse movement.
4.use any control device link to activate it. Cdlink to marker. TurnOff will disable it.
5.by default the timing is 10 seconds, so if you need to extend the time,use script>timing
If this won't be used at the start of the game.
What I discovered using this, was that if the player is looking up or down, the player will be frozen in that position, so it is wise to teleport the player to a marker first in the direction you want them facing. Then once frozen, the player can still use the mouse to look up and down and around,but won't be able to use the "escape"key to unfreeze themselves.
Lady Rowena on 7/12/2013 at 15:34
Ok, I was trying what gigigooga said and it worked fine, but I still had to figure out how to release the player.
Then I tried TrapKillEvents. It has a strange side effect. Garrett of course is walking when he enters the room. Or, to say it better, he is running, since there won't be any enemies around. Instead of freezing, which is what I want, he keeps on running, even if I release the mouse button. Even when the timing ends, he still runs, even with no input from me.
Maybe it's because I use the right mouse button to move forward?
BTW, this happens even if I delete the "event_mask=1000" from the design notes.
Thanks to both of you. :)
edit
I realized that I can set the timing on the freeze trap itself. It's all working just fine now. Thanks! :thumb:
darthsLair on 7/12/2013 at 17:50
Quote Posted by Lady Rowena
Ok, I was trying what gigigooga said and it worked fine, but I still had to figure out how to release the player.
Then I tried TrapKillEvents. It has a strange side effect. Garrett of course is walking when he enters the room. Or, to say it better, he is running, since there won't be any enemies around. Instead of freezing, which is what I want, he keeps on running, even if I release the mouse button. Even when the timing ends, he still runs, even with no input from me.
Maybe it's because I use the right mouse button to move forward?
BTW, this happens even if I delete the "event_mask=1000" from the design notes.
Thanks to both of you. :)
edit
I realized that I can set the timing on the freeze trap itself. It's all working just fine now. Thanks! :thumb:
Using the TrapKillEvents marker, did you use just the marker as described? You don't cd link it to the player.
You can use the other options available. See the link I provided to describe TrapKillEvents.
Lady Rowena on 7/12/2013 at 20:46
@darthsLair
Yes, my setup was exactly as described in your post: a marker with the script, the editor's note, and the roombrush linked to the marker, not to the player.
Now I'm using a marker with the TrapFreezePlayer script, a timing and the control flag "once", linked <- to the roombrush with the TrigRoomPlayer script. I didn't even need an inverter. Everything is working perfectly, Garrett immediately stops, he can still look around but can't unleash himself not even hitting Esc.
Why this script was less reliable in your opinion? I'm perfectly happy with it. :)
Yandros on 9/12/2013 at 03:11
I use each of those scripts, and sometimes use both together. The issue you saw where the player keeps walking is a result of TrapKillEvents locking out the keyboard and mouse but not forcing the player's velocity and acceleration to zero, so he just keeps walking (or running). The player keeps walking after you turn off the trap, until they hit and release the movement key corresponding to the direction(s) they are moving. This is seen in my Deathmatch mission since I use TKE when the player dies; the first issue isn't seen since the player falls over dead, but when they are brought back, they start walking until they hit a movement key. It would be great to get an updated TrapKillEvents that forces player velocity and acceleration to zero when the trap is turned on, which should be possible since those attributes are modified by the TrapMoveRelative script directly.