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

Forum Archive - from http://theuniversal.net
Locked
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

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

Post 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?
Last edited by flametard on Thu Oct 18, 2012 9:44 pm, edited 1 time in total.
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post 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.
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

will answer this tomorrow
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post 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.
Locked