Page 1 of 1

a way to freeze and unfreeze a player's movements via script

Posted: Thu Oct 18, 2012 9:40 pm
by flametard
I am looking for ways to freeze and unfreeze a player's movements via script, because I am unaware of a command that will do so. The reason why I need this, is to simulate being "indoors" and "outdoors" and be able to set playervars so the script understand the player is indoors or outdoors.

Options:

Cutscenes
when the player triggers the building, a cutscene is started. the camera points in a static (or slowly panning) potion near the player's position. An OSD window which cannot be closed with the esc button has the text "you are inside" and a button "exit building" the cutscene does not end until the player pushes the button or logs out.

I just don't know the command to exit a cutscene and allow the players to move freely around the world again. is there such a command?

Speclock
speclock mimics the type of cutscene described above, but the I don't see a command which will actually exit the speclock for the player, instead of allowing them to click the button. Also, I wouldnt want players to be able to press the apropriate F-button to spectate other players on the world.


Crow commands

I could set up a crow that has no movement, so it floats above the player's potition, with the command *gocrow [player]. and I can allow the player to exit the crow via an OSD button which executed the command *exitcrow [player]
But before I employed the crow method, I was wondering if any of the other ideas mentioned above will work afterall? if so, How would I accomplish this? Can anyone provide simple examples?

Posted: Thu Oct 18, 2012 9:42 pm
by flametard
Also, I need to note that when an OSD is triggered by a scripted or triggered building, the osdset "escapeblock" does not seem to work. I've tried lots of things and can't get it to work in conjunction with a building. But even if escblock did work with buildings, it alone wont work for my desired application since OSD's don't freeze a player's movements, so the player would be able to walk away from the building but the script would think he's still inside cause he didnt have to press the "exit building" button.

Posted: Fri Oct 19, 2012 12:03 am
by Mit
will answer this tomorrow

Posted: Mon Nov 05, 2012 9:38 pm
by flametard
was just informed by zaroba that I can also freeze and unfreeze a player's movements using starttask and endtask, which will work for my application only if i can disable the cancel task button.