Jump to content
Sign in to follow this  
AvihooI

what's a command that makes the player unit (man) be unable to move?

Recommended Posts

this disableAI "MOVE"

To make him move again:

this enableAI "MOVE"

Share this post


Link to post
Share on other sites

I am talking about the player controlled unit... not AI

Share this post


Link to post
Share on other sites

well, I don't want to disable the input entirely... I still want to make it possible for the player to look at whatever direction it wants, just not be able to move, i.e. walk/run.

Share this post


Link to post
Share on other sites

Again whats the situation? You might get the result you want by using attachto command. Norrin has a post with examples.

Share this post


Link to post
Share on other sites

An officer approaching the player willing to talk to him... would lose the effect if the player could just move freely.

Share this post


Link to post
Share on other sites
well, I don't want to disable the input entirely... I still want to make it possible for the player to look at whatever direction it wants, just not be able to move, i.e. walk/run.

Not possible. The only other option is to use disableUserInput

If that bothers you too much, make a camscene in which you disable the players move and anim capability and once the speech is over you end the cutscene and let the player take control again.

Share this post


Link to post
Share on other sites

alright, I guess that's the best alternative... what's the right way to start a camscene?

Share this post


Link to post
Share on other sites

try using the attachto command. I think that would be the way but you would have to mess with it. Best to attach player to the officer because otherwise player would be able to walk around with the officer stuck to him. Just mess around with it, otherwise you have to use disableuserinput.

http://community.bistudio.com/wiki/attachTo

Share this post


Link to post
Share on other sites

yeah I am aware of that effect... attachto wouldn't do much good cause I want to make the officer walk as he's talking. plus it would make a very unnatural teleport... I guess a camscene would do better, would lose the effect of being able to look freely, but that's the best way around it I reckon.

any link for a thread/guide that explains the creation of cameras and scenes?

Share this post


Link to post
Share on other sites

Check the wiki and look at all the CAM... commands http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2

also this ofpec tut might be helpful.

http://ofpec.com/ed_depot/index.php?action=details&id=50&game=ArmA

Otherwise a more basic way would be to use the triggers which if setup right can do a basic cutscene.

Share this post


Link to post
Share on other sites

Attach your player to a location with "attachto".. he will not be able to move.. but use his weapons and look around with his head tho..

a invisible helipad might do the trick

Share this post


Link to post
Share on other sites

yeah I figured how to do it... basically get the player's position, split it to three variables (x,y,z)... adjust a bit the y and z values then set the camera at that position... makes a nice top view.

Share this post


Link to post
Share on other sites

Well, you could maybe create a loop in a script where the players position is set to the same coordinates by using setPos - not sure if this works though but you could give it a try and tell us if it worked. Would actually try myself but dont have my arma pc here now :(

Share this post


Link to post
Share on other sites

ok, instead of a loop (which is a dirty unnecessary brute force to make something happen), I set up a trigger which detects if the player has moved too far (say 1 meters away) from the players starting location (I have the starting location stored in a variable) and if so it brings the player back to the starting position - the trigger reactivates itself after it fires.

I guess I could later on expand on this idea and instead of forcefuly making the player's unit return to his starting position, I could simply make the commanding officer order him to return or otherwise he gets court martialled (i.e. mission failed) - while this may sound quite redundant - I guess that's the most realistic response, considering that in real life, you can in fact get court martialled if you move out of reach while being at attention, or talked to by a commanding officer.

that's it I guess... feel free to share your own ideas

Edited by AvihooI

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×