Jump to content
CLRPG taikoo

Custom Vehicle Door Animations

Recommended Posts

So I am working on a helicopter that has a total of 6 doors...

 

  • two at the front (pilot and copilot) which I have opening and closing automaticaly when you get in to either of those seats.
  • Two at the back which rotate open to access the cargo area
  • One on each side behind the front doors which slide backwards to access the rear passenger area. 

 

The front and rear doors work fine but the ones in between are giving me problems in that they show the action to open the doors when they are closed but not to close them when they are open.

 

I'm looking for possible causes / ideas to fix this issue.

Share this post


Link to post
Share on other sites

Check your UserAction condition statement. You want something like this:

 

class AnimationSources {
	class Door_Open {
		source = "door";
		animPeriod = 1;
		initPhase = 0;
		sound = "MetalDoorsSound";
		soundPosition = "door_pos";
	};
};

class UserActions {
	class DoorOpen {
		...	
		condition = "(this doorPhase 'Door_Open' < 0.5) AND (player in this) AND (alive this)";
		statement = "this animateDoor ['Door_Open', 1];";
    };
	class DoorClose : DoorOpen {
		...	
		condition = "(this doorPhase 'Door_Open' > 0.5) AND (player in this) AND (alive this)";
		statement = "this animateDoor ['Door_Open', 0];";
    };          
};

 

  • Like 1

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

×