Results 1 to 7 of 7

Thread: Disable Movement

  1. #1

    Disable Movement

    Hi there,

    i jost got it working to place a sitting unit on a chair but every time someone comes close to the unit it stands up to salute and everything is messed up. Is there any command wich tells the unit to do absolutely nothing?

    I'm using the following code in the init line of the soldier:
    Code:
    s1 attachTo [chair1,[0,0,0.4]];
    s1 disableAI "anim";
    s1 disableAI "move";
    s1 stop true; 
    s1 switchMove "sitUnarm_R_idleLoop4";
    Any help is appreciated!

  2. #2
    It doesn't work for me if I place it in an init line but does work in a trigger.

    The unit doesn't get out of the chair either, the attachto command doesn't do anything.
    Last edited by F2k Sel; Aug 14 2009 at 23:12.

  3. #3
    Gunnery Sergeant IndeedPete's Avatar
    Join Date
    Jun 14 2009
    Location
    Germany
    Posts
    501
    Author of the Thread
    Now that's strange. Anyways, thank you! Never thought this could cause the problem...

    Edit: Hm, now the unit gets hurt every time the trigger activates. Sometimes he dies. Very strange...
    Last edited by IndeedPete; Aug 15 2009 at 00:07.

  4. #4

  5. #5
    Quote Originally Posted by kju View Post
    disableSimulation
    probably the unit will no longer move though
    It's unit enableSimulation false;

    But I was never able to get them to sit correctly enough to post that solution.

  6. #6
    Seems I was wrong they did stand up after all, I didn't leave it running for long enough.

    They didn't stand up when I walked upto them though just after a set time.



    The best I got it working without using the unit enableSimulation false; (good find) but it makes them static.

    Place fix=false in the units init line, set a trigger up to repeat and timers to 20.
    In the condition box type fix and (alive s1) and on dea fix=true.

    Then place this code in the On Act box.
    Code:
    s1 switchMove "sitUnarm_R_idleLoop4";chair1 setDir (getDir s1)-90; chair setPos (s1 modelToWorld [-.12,-.05,0]);fix=false
    What it does it positions the folding chair to the unit so it looks correct and then just keeps refreshing the command every 20 secs.

    There is one problem you can the soldier but it won't register the effect for some time.

  7. #7
    Gunnery Sergeant IndeedPete's Avatar
    Join Date
    Jun 14 2009
    Location
    Germany
    Posts
    501
    Author of the Thread
    Thanks for the suggestions but now i'm using a simple script:
    Code:
    while {true} do {
    	s1 disableAI "anim";
    	s1 disableAI "move";
    	s1 stop true;
    	s1 switchMove "sitUnarm_R_idleLoop4";
    	s2 disableAI "anim";
    	s2 disableAI "move";
    	s2 stop true;
    	s2 switchMove "sitUnarm_R_idleLoop5";
    	s3 disableAI "anim";
    	s3 disableAI "move";
    	s3 stop true;
    	s3 switchMove "sitUnarm_R_idleLoop5";
    	sleep 5;
    };
    And it works:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •