Jump to content

Home

Script codes needed please


randydg

Recommended Posts

I need a script 2 if anyone can do them for me prety please :)

 

1. A script that all it does its do a dead/sleep loop animation.

(such as you place this script in an invisible placeable and click it and it will do the animation, but there has to be a way to breat it once your ready to stop. maybe a timer on the animation like 30 seconds or whatever)

 

2. Same as above but instead do a sit animation.

(like atton, the jedi council, etc.. that are sitting)

 

If someone can help me out with this I would be most thankfull. Will include many thanks and credits.

 

 

Edit: I found what i needed above, but on the sit_feet_stationary(20) animation

i sit like your sitting in a chair but then I get right back up I dont stay seated

Also, On the jump to waypoint (co-pilot seat in cockpit on ebon hawk) its not working for somereason.

Here is my code:

void main()
{

   object oway = GetWaypointByTag( "WP_copilot" );
   object oTarg;
   oTarg = GetFirstPC();


DelayCommand( 0.1, AssignCommand( GetFirstPC(), ActionJumpToObject( oway ) ) );

   DelayCommand( IntToFloat(1), AssignCommand(oTarg, PlayAnimation
       (10000 + 44, IntToFloat(1), IntToFloat(-1))));
   DelayCommand( IntToFloat(1), AssignCommand(oTarg, PlayAnimation
       (10000 + 20, IntToFloat(1), IntToFloat(-1))));
}

Link to comment
Share on other sites

1. A script that all it does its do a dead/sleep loop animation.
http://www.lucasforums.com/showpost.php?p=2417661&postcount=2

Look at the second script in the post. Remove the if-clause before playing the animation.

 

Edit: I found what i needed above, but on the sit_feet_stationary(20) animation

i sit like your sitting in a chair but then I get right back up I dont stay seated

Also, On the jump to waypoint (co-pilot seat in cockpit on ebon hawk) its not working for somereason.

Try to clear the action queue with a ClearAllActions() before the jump. You are calling two animations in the script. A character can only do one at a time. The animation 10020 is just a fire and forget, not a looping one, so it will stop after a while.

 

void main()
{

   object oway = GetWaypointByTag( "WP_copilot" );
   object oTarg;
   oTarg = GetFirstPC();

   DelayCommand(0.1, AssignCommand(oTarg, ClearAllActions()));
   DelayCommand( 0.1, AssignCommand( oTarg, ActionJumpToObject( oway ) ) );

   DelayCommand(1.0, AssignCommand(oTarg, ClearAllActions()));
   DelayCommand( 1.0, AssignCommand(oTarg, ActionPlayAnimation
       (ANIMATION_LOOPING_SIT_CHAIR, 1.0, -1.0)));
}

Link to comment
Share on other sites

Ok, That worked thanks, I just have 2 questions.

 

1. Is the only way to break it to set the timer to like 5.0 or something? so a player can sit in a chair. Or is there a script that will break it if you try to move?

 

2. Whats the animation string for laying down sleeping? I tried ANIMATION_LOOPING_SLEEP but its standing up instead of laying down.

Link to comment
Share on other sites

1. Is the only way to break it to set the timer to like 5.0 or something? so a player can sit in a chair. Or is there a script that will break it if you try to move?
The third parameter in ActionPlayAnimation determines the duration. Replace the -1.0 with 5.0 or whatever you want. An animation will also stop once you tell the character to do something else like moving.

 

2. Whats the animation string for laying down sleeping? I tried ANIMATION_LOOPING_SLEEP but its standing up instead of laying down.
ANIMATION_LOOPING_DEAD_PRONE should do that.
Link to comment
Share on other sites

I tried to get up but it wont break the animation, but i did a injection and got up. I guess I will have to just set the timer to like 5 to 10

 

 

The ANIMATION_LOOPING_DEAD_PRONE worked for what i needed thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...