I am trying to make a canteen that can be used to give you a drink of water. I have a model, and the scripting side of things (such as getting thirsty, refilling a canteen etc etc) can be done via scripts etc. The problem I am having is getting it to be animated using the binocular animations (which, when working, should look right). Here's the config for the object:
#define WeaponNoSlot 0
#define WeaponSlotPrimary 1
#define WeaponSlotSecondary 16
#define WeaponSlotItem 256
#define WeaponSlotBinocular 4096
#define WeaponHardMounted 65536
class CfgPatches
{
class ds_canteen
{
units[] = {canteen};
weapons[] = {canteen};
requiredVersion = 1.40;
};
};
//CfgVehicles for Testing purposes only
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierWB:Soldier{};
class SoldierWSniper:SoldierWB{};
class ds_canteen:SoldierWSniper
{
displayName="US WaterDude";
weapons[]={us_canteen};
nightVision=0;
camouflage=0.600000;
moves="CfgCanteenMoves";//looks for the config underneath
};
};
class CfgWeapons
{
class Default {};
class Binocular: Default {};
class canteen: Binocular
{
scopeMagazine=2;
valueWeapon=5;
weaponType=WeaponSlotBinocular;
picture="";
sound[]={"",0,1};
useAction=0;
useActionTitle="";
optics=0;
forceOptics=0;
scope=2;
canDrop=1;
};
class ir_canteen: canteen
{
model="\ds_canteen\canteen.p3d";
displayName="Iraqi Canteen";
};
class us_canteen: canteen
{
model="\ds_canteen\us_canteen.p3d";
displayName="US Canteen";
};
};
class CfgNonAIVehicles
{
class ProxyWeapon {};
class ProxyCanteen: ProxyWeapon {};
};
And then there is the CanteenMoves.pbo, which only has the following config file in it:
#define WeaponNoSlot 0
#define WeaponSlotPrimary 1
#define WeaponSlotSecondary 16
#define WeaponSlotItem 256
#define WeaponSlotBinocular 4096
#define WeaponHardMounted 65536
class CfgPatches
{
class CfgCanteenMoves
{
units[] = {};
weapons[] = {};
requiredVersion = 1.75;
};
};
class CfgDSManActions
{
CanteenOn="";
CanteenOff="";
};
class CfgMovesMC{};
class CfgCanteenMoves:CfgMovesMC
{
class DSNoActionsAll: CfgDSManActions
{
access=3;
};
class DSNoActions: DSNoActionsAll
{
ladderOnDown="LadderDownStart";
ladderOnUp="LadderUpStart";
turnSpeed=1;
upDegree=-1;
limitFast=5;
};
class DSCombatActions: DSNoActions
{
CanteenOn="Canteen";
CanteenOff="Combat";
};
class DSCombatNoMoveActions: DSCombatActions
{
stopRelaxed="";
walkF="";
walkLF="";
walkRF="";
walkL="";
walkR="";
walkLB="";
walkRB="";
walkB="";
slowF="";
slowLF="";
slowRF="";
slowL="";
slowR="";
slowLB="";
slowRB="";
slowB="";
fastF="";
fastLF="";
fastRF="";
fastL="";
fastR="";
fastLB="";
fastRB="";
fastB="";
turnL="";
turnR="";
turnLRelaxed="";
turnRRelaxed="";
turnSpeed=2;
};
class DSStandActions: DSNoActions
{
CanteenOn="CanteenStand";
CanteenOff="Stand";
}
class DSCrouchActions: DSCombatActions
{
CanteenOn="CanteenCrouch";
CanteenOff="Crouch";
}
class DSLyingActions: DSNoActions
{
CanteenOn="CanteenLying";
CanteenOff="Lying";
}
class CanteenActions: DSCombatNoMoveActions
{
stop="Canteen";
default="Canteen";
CanteenOff="Combat";
upDegree=MANPOSBINOC;
};
class CanteenLyingActions: DSLyingActions
{
stop="CanteenLying";
default="CanteenLying";
CanteenOff="Lying";
walkF="";
walkLF="";
walkRF="";
walkL="";
walkR="";
walkLB="";
walkRB="";
walkB="";
slowF="";
slowLF="";
slowRF="";
slowL="";
slowR="";
slowLB="";
slowRB="";
slowB="";
fastF="";
fastLF="";
fastRF="";
fastL="";
fastR="";
fastLB="";
fastRB="";
fastB="";
turnL="";
turnR="";
turnLRelaxed="";
turnRRelaxed="";
upDegree=MANPOSBINOCLYING;
turnSpeed=1;
};
class CanteenStandActions: DSStandActions
{
stop="CanteenStand";
default="CanteenStand";
CanteenOff="Stand";
walkF="";
walkLF="";
walkRF="";
walkL="";
walkR="";
walkLB="";
walkRB="";
walkB="";
slowF="";
slowLF="";
slowRF="";
slowL="";
slowR="";
slowLB="";
slowRB="";
slowB="";
fastF="";
fastLF="";
fastRF="";
fastL="";
fastR="";
fastLB="";
fastRB="";
fastB="";
turnL="";
turnR="";
turnLRelaxed="";
turnRRelaxed="";
upDegree=MANPOSBINOCSTAND;
turnSpeed=2;
};
class CanteenCrouchActions: DSCrouchActions
{
stop="CanteenCrouch";
default="CanteenCrouch";
CanteenOff="Crouch";
walkF="";
walkLF="";
walkRF="";
walkL="";
walkR="";
walkLB="";
walkRB="";
walkB="";
slowF="";
slowLF="";
slowRF="";
slowL="";
slowR="";
slowLB="";
slowRB="";
slowB="";
fastF="";
fastLF="";
fastRF="";
fastL="";
fastR="";
fastLB="";
fastRB="";
fastB="";
turnL="";
turnR="";
turnLRelaxed="";
turnRRelaxed="";
upDegree=MANPOSBINOC;
turnSpeed=2;
};
class DSDefault
{
access=3;
actions="DSStandActions";
file="";
looped=1;
speed=0.500000;
disableWeapons=0;
enableOptics=1;
disableWeaponsLong=0;
showWeaponAim=1;
enableMissile=0;
enableBinocular=0;
showItemInHand=0;
showItemInRightHand=0;
showHandGun=0;
onLandBeg=0;
onLandEnd=0;
onLadder=0;
duty=-0.500000;
visibleSize=1;
aimPrecision=1;
recoilSuffix="";
relSpeedMin=1.000000;
relSpeedMax=1.000000;
soundEnabled=1;
soundOverride="";
soundEdge1=0.500000;
soundEdge2=1;
terminal=0;
limitGunMovement=1;
variantsPlayer[]={};
variantsAI[]={""};
equivalentTo="";
connectAs="";
variantAfter[]={5,10,20};
connectFrom[]={};
connectTo[]={};
interpolateWith[]={};
interpolateTo[]={};
interpolateFrom[]={};
aiming="aimingDefault";
legs="legsDefault";
head="headDefault";
interpolationSpeed=6;
interpolationRestart=0;
preload=0;
};
class States
{
class CombatToCanteen: DSDefault
{
actions="DSCombatActions";
file="sdalek.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
};
class Canteen: DSDefault
{
actions="CanteenActions";
file="sdalekstat.rtm";//Original Binocular Animation
speed=10000000000.000000;
looped=1;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
enableBinocular=1;
head="headNo";
};
class CanteenToCombat: DSDefault
{
actions="CanteenActions";
file="sdalek2.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=1;
showItemInHand=1;
soundEnabled=0;
};
class LyingToCanteenLying: DSDefault
{
actions="DSLyingActions";
file="plazenidalek.rtm";//Original Binocular Animation
speed=-2.000000;
looped=0;
disableWeapons=0;
soundEnabled=0;
showItemInHand=1;
onLandBeg=1;
onLandEnd=1;
};
class CanteenLying: DSDefault
{
actions="CanteenLyingActions";
file="plazenidalekstat.rtm";//Original Binocular Animation
speed=10000000000.000000;
looped=1;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
enableBinocular=1;
onLandBeg=1;
onLandEnd=1;
duty=-1;
};
class CanteenLyingToLying: DSDefault
{
actions="DSLyingActions";
file="plazenidalek2.rtm";//Original Binocular Animation
speed=-2.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
onLandBeg=1;
onLandEnd=1;
};
class StandToCanteenStand: DSDefault
{
actions="DSStandActions";
file="bezdalek.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
connectFrom[]={"Stand",2};
};
class CanteenStand: DSDefault
{
actions="CanteenStandActions";
file="bezdalekstat.rtm";//Original Binocular Animation
speed=10000000000.000000;
looped=1;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
enableBinocular=1;
connectFrom[]={"StandToCanteenStand",1};
connectTo[]={"CanteenStandToStand",1};
};
class CanteenStandToStand: DSDefault
{
actions="DSStandActions";
file="bezdalek2.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
connectTo[]={"Stand",2};
};
class CrouchToCanteenCrouch: DSDefault
{
actions="DSCrouchActions";
file="klekdalekstart.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
connectFrom[]={"Crouch",2};
};
class CanteenCrouch: DSDefault
{
actions="CanteenCrouchActions";
file="klekdalekstat.rtm";//Original Binocular Animation
speed=10000000000.000000;
looped=1;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
enableBinocular=1;
connectFrom[]={"CrouchToCanteenCrouch",1};
connectTo[]={"CanteenCrouchToCrouch",1};
};
class CanteenCrouchToCrouch: DSDefault
{
actions="DSCrouchActions";
file="klekdalekend.rtm";//Original Binocular Animation
speed=-1.000000;
looped=0;
disableWeapons=0;
showItemInHand=1;
soundEnabled=0;
connectTo[]={"Crouch",2};
};
class DSInterpolations
{};
transitionsInterpolated[]={};
transitionsSimple[]={"Combat","CombatToCanteen",2,"CombatToCanteen","Canteen",2,"Canteen","CanteenToCombat",2,"CanteenToCombat","LyingToCanteenLying",2,"LyingToCanteenLying","CanteenLying",2,"CanteenLying","CanteenLyingToLying",2,"CanteenLyingToLying","Lying",2};
transitionsDisabled[]={};
};
Any help GREATLY appreciated. If I remove all the animation stuff, and just have a soldier with the Canteen, it works fine (well, you can drop it, pick it up, have it as your weapon). As soon as I try using the animations (which are BIS animations) it crashes to desktop as soon as I try to preview it in the MissionEditor.
Thanks for any help.