ando
Sergeant
Posts: 31
|
Post by ando on Aug 23, 2009 1:40:21 GMT -8
Vehicle animation recording:
- open your map with editor - add a vehicle - Press F8, F9 - sit in a vehicle - Alt + t, h, s (start recording) - drive around - Alt + t,h ,e (save recording) Engine is saving *.va and *.manm file too.
And if you wnt to wach it later then F8, Alt+t, h, p (open *.va file and choose vehicle from list)
I redesign my vehicle animation script (from Hai Lang) soon too. Its too complicated to use it now.
|
|
|
Post by mro on Sept 7, 2009 4:34:45 GMT -8
Hi Ando, I have some questions about this: - how to apply AI to the vehicle: you know it since created it in HaiLang - is it possible to use this also for helicopter? no.. - I tried some tests with T34, trying to shoot with cannon and gun, but obviously it just record movements, and not shoots: how to? I guess applying players
|
|
ando
Sergeant
Posts: 31
|
Post by ando on Sept 7, 2009 4:46:52 GMT -8
You cant use it with helicopter because you cant drive with it as driver too.
I was writing new (easier to use) script for vehicle animations but now there is some synchronization bugs. If I can't fix it soon then I just upload all my Hai Lang scripts.
|
|
|
Post by mro on Sept 7, 2009 7:51:27 GMT -8
thankyou
|
|
Zybero
Staff Sergeant
Posts: 81
|
Post by Zybero on Sept 16, 2009 11:30:29 GMT -8
// Jeep Driver
#define GROUP 2 #define GENERICVOICE "macv" #define MEMBERID 0 #define RANK 7 #define NAME_NR 2730 #define VEHICLELINK 0 #define VEHICLENAME "Driving_Jeep"
//#define DISABLEPLAYER
#define NOWEAPONS
#include <inc\shigor\ussoldier.cxx>
This will aply a Macv Soldier to a vehicle..
|
|
|
Post by mro on Sept 17, 2009 6:11:54 GMT -8
wonderful!
|
|
Zybero
Staff Sergeant
Posts: 81
|
Post by Zybero on Sept 17, 2009 6:28:34 GMT -8
If you go look in USSoldier.cxx you will find something like this:
} else if (CLASS==8){ //apc driver usGetPlayerIniEqp(RANK,CLS_SOLDIER,SUB_RND,&ini_eqp); sprintf(ini_eqp.bodyIni,"cup_pilot01"); sprintf(ini_eqp.bodyEqp,"g\\characters\\cup_pilot01\\apc\\eqp.ini"); sprintf(ini_eqp.headIni,"hvm_009"); sprintf(ini_eqp.headEqp,"G\\characters\\_heads\\_eqpini\\uhg019.ini"); If you add this under nead it and set the driver of the jeeps class to 9 you will get a USMC Soldier
} else if (CLASS==9){ //USMC usGetPlayerIniEqp(RANK,CLS_SOLDIER,SUB_RND,&ini_eqp); sprintf(ini_eqp.bodyIni,"cup_usmc04"); sprintf(ini_eqp.bodyEqp,"g\\characters\\cup_usmc04\\US5_SOL_A\\eqp.ini"); sprintf(ini_eqp.headIni,"hwm_002"); sprintf(ini_eqp.headEqp,"G\\characters\\_heads\\_eqpini\\uhg008.ini"); This will add Hawkins ;D Just for fun...
} else if (CLASS==5){ //Hawkins usGetPlayerIniEqp(RANK,CLS_SOLDIER,SUB_RND,&ini_eqp); sprintf(ini_eqp.bodyIni,"CUP_CMMNDO01"); sprintf(ini_eqp.bodyEqp,"g\\characters\\CUP_CMMNDO01\\basic\\eqp.ini"); sprintf(ini_eqp.headIni,"hwm_020"); sprintf(ini_eqp.headEqp,"G\\characters\\_heads\\_eqpini\\uhg011.ini"); And can i get a confirmation af if that is Hawkins right head? And i think CPT. Rosenfields is "hwm_21"
|
|
|
Post by mro on Sept 17, 2009 16:30:21 GMT -8
reply you tomorrow
|
|
vatu
Private First Class
Posts: 4
|
Post by vatu on Jul 13, 2010 11:43:56 GMT -8
Has anybody get to T-34 working? I get it works fine with modified Andos coop script, but the only big problem is that it can't be destroyed.
If I use model called t34_mp.bes, i can se only shadow of the tank, the tank is invisible. All the other things works fine and it is destroyable.
If I use model called t34.bes, i can see the tank and all other things works fine, it moves, AI shoot with the cannon and machine gun, but the tank is indestructible.
So anyone any ideas?
|
|
daan24
Private First Class
Posts: 11
|
Post by daan24 on Apr 10, 2012 6:55:25 GMT -8
vatu try this
#include <inc/maxovo/!max_defs.h> #include <inc/maxovo/!max_support.h>
#define ENABLE_IN_MODE_COUNT 1 char *ENABLE_IN_MODE[ENABLE_IN_MODE_COUNT] = { "COOP" };
//------------------------------------------- #include <inc\b&a\Common.cxx> //-------------------------------------------
#define LEAVE_VEH FALSE //if true leave vehicle after animation
#define VEHICLENAME "t34_mp" #define SEATS_COUNT 3 //number of players linked with a car char *VEH_PLAYER_NAMES[SEATS_COUNT] = { "Tank1", "Tank2", "Tank3"};
#define ANIM_COUNT 4 char *ANIM = "levels\\tigerfalls\\data\\testmap6\\anim\\tank%d.va"; //char *ANIM = "levels\\tigerfalls\\data\\testmap6\\anim\\tanktest%d.manm"; //#define USE_ANIM_MANM #define USE_ANIM_VA int animnr; dword MANM;
#define SYNCH_TANKTIMER 16 #define SYN_DATASIZE 6 struct{ float time; int anim_id; }S_timer;
struct{ float time; int anim_id; }C_timer;
c_Vector3 impulse_vector = (48000, -75000, -10000); c_Vector3 world_point_of_application = (-381, -180, 25);
//--------------------------------------------------------------------------------------- #ifndef TM_NEXT_EXEC #define TM_NEXT_EXEC 0.15f #endif
BOOL veh_pl_stat; s_SC_P_status veh_pl_status; sc_nod nodi, body;
dword gPhase = GP_START; dword type = SC_SCRIPTHELPER_TYPE_ERROR; s_sphere sph; c_BoxOriented box; float g_tmNextExec = TM_NEXT_EXEC; dword g_hManm = NULL, g_iCamera = NULL; float g_tmAnmLen = 0, g_tmAnmCurTime = 0; s_SC_PC_Control g_pcCtrl;
BOOL isserver(){ if (!SC_IsMpGame()) return FALSE; if (SC_IsMpClient()) return FALSE; return TRUE; }
BOOL PC_InHelper(char *helpername){ s_SC_Area area; s_sphere sph; c_BoxOriented box; sc_player list[32];
CLEAR(area);
switch (SC_GetScriptHelper(helpername,&sph,&box)){ case SC_SCRIPTHELPER_TYPE_ERROR: return FALSE; case SC_SCRIPTHELPER_TYPE_SPHERE: area.sphs=1; area.sph=&sph; break; case SC_SCRIPTHELPER_TYPE_BOX: area.boxes=1; area.box=&box; break; }
if (SC_EnumPlayersArea(SC_P_SIDE_ALL, SC_P_GROUP_ALL, list, 32, SC_ENUMPLS_FL_RESPAWNEDONLY | SC_ENUMPLS_FL_PC_ONLY , &area)) return TRUE; return FALSE; }
//---------------------MAIN------------------ int ScriptMain(s_SC_ScriptHelper_info *info) { c_Vector3 vec; s_SC_PC_Control pcCtrl; sc_player player, player2, player3; int i; info->next_exe_time = g_tmNextExec; switch(info->event_type) { case SC_SCRHELPER_EVENTTYPE_INIT:
if (SC_IsMpGame()) { char *mode_name; char mode_name_local[MAX_STRING_LEN_LONG];
mode_name = SC_MP_GetModeName(); strcpy(mode_name_local, mode_name); to_upcase(mode_name_local);
if(SC_StringSame(mode_name_local ,ENABLE_IN_MODE[0])) { gPhase = GP_START; } else { gPhase = GP_IDLE; } }
break;
case SC_SCRHELPER_EVENTTYPE_TIMETICK:
switch(gPhase) { case GP_START: nodi = SC_NOD_Get(NULL, VEHICLENAME); body = SC_NOD_Get(nodi, "body.l00"); if (isserver()) { SC_MP_Synch_Create(SYNCH_TANKTIMER, &S_timer, SYN_DATASIZE); } else { SC_MP_Synch_Create(SYNCH_TANKTIMER, &C_timer, SYN_DATASIZE); } gPhase = GP_CHECK; break;
case GP_CHECK:
if (isserver()){ if (PC_InHelper(info->nod_name)){ SC_Marok_Impuls(body, &impulse_vector, &world_point_of_application); gPhase = GP_OBJANIM_START; info->next_exe_time = 0.96f; } } else {
animnr = C_timer.anim_id; if (animnr > 0){ info->next_exe_time = 0.9f; gPhase = GP_OBJANIM_START; } } break; //start anim case GP_OBJANIM_START: { char buf [80];
if (isserver()){ animnr = (rand()%ANIM_COUNT + 1); S_timer.anim_id = animnr; SC_MP_Synch_SendChanges(SYNCH_TANKTIMER, TRUE);
for (i=0; i<SEATS_COUNT; i++) { player = SC_P_GetByEntityName(VEH_PLAYER_NAMES[i]); SC_P_Vehicle_Link(player, nodi ,i); } } i = sprintf(buf, ANIM, animnr); g_tmAnmCurTime = 0; #ifdef USE_ANIM_VA g_tmAnmLen = SC_VEH_StartAnim(nodi, buf); #endif #ifdef USE_ANIM_MANM MANM = SC_MANM_Create(buf); g_tmAnmLen=SC_MANM_GetLength(MANM,0); SC_MANM_Set(MANM, 0, nodi, g_tmAnmCurTime); #endif
g_tmNextExec = 0.0; gPhase = GP_OBJANIM_PLAY; } break; //play case GP_OBJANIM_PLAY: if (g_tmAnmCurTime < g_tmAnmLen) { g_tmAnmCurTime += info->elapsed_time; if (isserver()){ S_timer.time = g_tmAnmCurTime; #ifdef USE_ANIM_MANM SC_MANM_Set(MANM, 0, nodi, g_tmAnmCurTime); #endif SC_MP_Synch_SendChanges(SYNCH_TANKTIMER, FALSE); player = SC_P_GetByEntityName(VEH_PLAYER_NAMES[0]); veh_pl_stat = SC_P_GetStatus(player, &veh_pl_status);
if (veh_pl_status.health_status == NULL) { } else { g_tmAnmLen = g_tmAnmCurTime; } } else { if (C_timer.time > g_tmAnmCurTime) g_tmAnmCurTime = C_timer.time+0.06; #ifdef USE_ANIM_VA SC_VEH_SetAnimCurTime(nodi, g_tmAnmCurTime); #endif
#ifdef USE_ANIM_MANM SC_MANM_Set(MANM, 0, nodi, g_tmAnmCurTime); #endif }
info->next_exe_time = 0.0f; } else //end vehicle animation { #ifdef USE_ANIM_VA SC_VEH_StopAnim(nodi); #endif #ifdef USE_ANIM_MANM SC_MANM_Release(MANM); #endif if (LEAVE_VEH) { for (i=0; i<SEATS_COUNT; i++) { player = SC_P_GetByEntityName(VEH_PLAYER_NAMES[i]); SC_P_Vehicle_Leave(player); } } SC_MP_Synch_Remove(SYNCH_TANKTIMER); g_tmNextExec = 0.5f; gPhase = GP_IDLE; } break; case GP_IDLE: info->next_exe_time = 0.2f; break; } break;
case SC_SCRHELPER_EVENTTYPE_RELEASE: SC_MP_Synch_Remove(SYNCH_TANKTIMER); break; //---------------- // default: // return FALSE; } return TRUE;
}
dont know if it works but i found it in a map with a working enemy t34 ai tank and the scripts was in the package
|
|