OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: General Barron on 09 Mar 2004, 06:01:38
-
Here's the deal; I've made myself a small little animation pack, for use with a mission I'm making (the link is in my signature).
The problem is that it is possible to play my mission WITHOUT the animation addon, without generating any error messages. All "playmove" commands using those animations are just ignored.
I want to make it so that you CANNOT load/play the mission without the addon being present--just like with a regular unit/vehicle addon. Is there a way to do this? If so, how? Here is my .cpp for reference:
// USMC Hand/Arm Signals (animations)
// By General Barron
// aw_barron@hotmail.com
// Version 1.0
// 2/17/04
class CfgPatches
{
class NewMove
{
units[] = {};
weapons[] = {};
requiredVersion = 1.10;
};
};
class CfgMovesMC
{
class Default {};
class Combat: Default{};
class Crouch: Combat{};
class States
{
class GENB_SignDown: Crouch
{
actions = CrouchActions;
file=\GENB_USMC_Signals\GENB_Sign_Down.rtm;
speed = -2.4; // negative - time is given
looped=false;
soundEnabled=false;
duty = RestDuty;
interpolationSpeed=1;
connectFrom[]={Crouch,1};
connectTo[]={Crouch,1};
interpolateTo[]={CrouchDying,1};
};
//and so on with the rest of the signals
Any help is greatly appreciated. Thanks in advance!
-
I guess you could either manually add the reference to your addon in your mission.sqm:
class Mission
{
addOns[]=
{
"My_Addon"
};
addOnsAuto[]=
{
"My_Addon"
};
};
Or add a game logic to your config.cpp and include that in the mission editor when you design your missions.
-
But aren't the addons listed in the missions addons section the names that are in the cfgPatches class? Or would I put the name of the pbo?
I was thinking about using a gamelogic like that too. Looks like that will be the best way to do it. THanks :)