Jump to content
Sign in to follow this  
*zeewolf*

Restrict unit animations?

Recommended Posts

I want to restrict a certain soldier class to a limited range of animations, such that a player using the class can't sprint, run or go prone.

So CombatActions slowF and fastF should play StandJogF. All down actions should map to crouch.

Do I need to make a complete customised copy of CfgMovesMC to do this? Or is there a more efficient way to limit a single unit's animations?

Share this post


Link to post
Share on other sites

Until someone more knowledgeable,comes along I thought I'd get the ball rolling.

How about Statesext?

class CfgMovesMCWoman: CfgMovesMC

{

class StatesExt

{

class CivilBase: Default

{

aiming="aimingNo";

actions="CivilActions";

duty=4294967295

disableWeapons=1

interpolateTo[]={"CivilDying",0.100000,"CivilDyingVer2",0.100000};

interpolationSpeed=3

};

class Civil: CivilBase

{

file="\o\anim\zenskastojistat.rtm";

speed=10000000000.000000;

looped=1

soundEnabled=0

variantAfter[]={1,3,6};

variantsAI[]={"Civil",0.200000,"CivilStillV1",0.800000};

equivalentTo="Civil";

interpolateTo[]={"CombatThrowGrenadeStart",1,"CombatRunThrowGrenadeStart",1,"CivilDying",0.100000,"CivilDyingVer2",0.100000};

interpolateFrom[]={"CombatThrowGrenadeEnd",1};

};

class CivilStillV1: Civil

{

actions="CivilActions";

file="\o\anim\zenskastoji.rtm";

speed=4294967286

looped=1

soundEnabled=0

duty=4294967295

};

Class CivilBase is already defined in the resistance config.

Class Civil there points to a different rtm."CivilStat.rtm".

Share this post


Link to post
Share on other sites

Thanks that looks like it will do the job.

I'm thinking of making a Juggernaut game mode, since I came up with an idea of how to do a script that can respawn players into different unit classes, a sort of team switch function for OFP. So a player could spawn as a regular soldier, but once they kill the juggernaut then they are spawned as the juggernaut. When they die as juggernaut they can be spawned back to being a regular soldier etc. The juggernaut needs to move slow and be unable to crawl while having enormous armor values.

So I'm on the look out for models of EOD/bomb disposal suits. If I can't find one I'll have to stick with a SWAT style model.

Share this post


Link to post
Share on other sites
Thanks that looks like it will do the job.

I'm thinking of making a Juggernaut game mode, since I came up with an idea of how to do a script that can respawn players into different unit classes, a sort of team switch function for OFP. So a player could spawn as a regular soldier, but once they kill the juggernaut then they are spawned as the juggernaut. When they die as juggernaut they can be spawned back to being a regular soldier etc. The juggernaut needs to move slow and be unable to crawl while having enormous armor values.

So I'm on the look out for models of EOD/bomb disposal suits. If I can't find one I'll have to stick with a SWAT style model.

*Zeewolf* is that possible???? To make units respawn as a different classes?

If so this is amazing! This would open a new animating window for OFP/Arma:CWA, since different units can use different animations sets for same actions...

Can you share some more information about this script, what are its limitations? :butbut:

Icarus

Share this post


Link to post
Share on other sites

It's only for multiplayer obviously. I haven't tested it out yet on a network, but I got a basic mission working and it has some limitations depending upon how heavily you script the transition.

It relies on manipulating the "Respawn as other unit" mode, where you respawn as a member of your group.

So if you want to spawn the player into an arbitrary class, you override the event script "onPlayerRespawnOtherUnit.sqs" with your own version to override the standard camera allowing you to do some "behind the scenes" work and manage the transition (or you could manage it using a killed eventhandler it doesn't matter). It essentially relies on having a unit in the player's group for them to spawn into when they die. So my plan for my game mode is quite basic at the moment, to have an immobile AI squad member somewhere on the map for the player to spawn into. Once the player has transferred, their new unit is setpossed into the mission area and a replacement AI unit spawned into the group using createunit.

It's important to note that for this to work the unit to be transferred into must be spawned into the group before the player's death, if death can't be predicted then the unit must be spawned and "hidden". For other situations where the player requests to transfer to another unit using a dialog, the script itself is what kills the player so the AI unit they'll spawn into can be created "on demand" of any given type prior to killing the player.

E.g. (I haven't tried it this way but it should work)

1. Player chooses to transfer from a soldierWB to a SoldierWSaboteur unit using a dialog or action menu.

2. Script blacks screen and disables radio (using enableradio).

3. If there are more units in the players group move the player into an empty temporary group using join.

4. Spawn the SoldierWSaboteur into the temporary group using create unit.

5. Kill the player, allow the engine to transfer the player to the new unit.

6. Transfer the player back into their original group (if they were the leader some messing around may be needed to get them back in charge).

7. Setpos the player to their original position and transfer gear if necessary. Dispose of the player's dead body if desired.

8. Black in the screen to reveal the player using a new class. Enable the radio again.

I think this can all be done surprisingly quickly if it's performed on the local machine.

Edited by *Zeewolf*

Share this post


Link to post
Share on other sites

You can use StatesExt and change all of the CombatSprint/CombatRun/etc states to be identical to StandRunF. However, I think it would be easier to work with your own CfgMovesMC - that way you can just change the actions themselves (fastF=StandWalkF). It will be much less work.

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  

×