November 26 2024 06:43:28
Navigation
· Home
· Articles
· Downloads
· FAQ
· Discussion Forum
· Web Links
· News Categories
· Contact Me
· Photo Gallery
· Search
· Gameservers
Languages
Users Online
· Guests Online: 53

· Members Online: 0

· Total Members: 1,134
· Newest Member: Brody
Teamspeak 3
Last Seen Users
· hackepter08:13:41
· GONZO14:20:06
· Intruder14:46:49
· Sully 1 day
· desintegrator 2 days
· WEZ 2 days
· Homi 3 days
· The ACE 4 days
· xhc 1 week
· dRgiGGLeZ 1 week
· El Dookie 1 week
· Melber 2 weeks
· SGT PEPPER 2 weeks
· martyr 2 weeks
· Terminator 2 weeks

View Thread: Problems with Heli script
Vietcong.Info » Vietcong 2 General Discussion » Vietcong 2 Tech Talk
Who is here? 1 Guest
Current Rating: (Total: 0 ratings)  
 Print Thread
Problems with Heli script
Desty
Hello!

I have problems with the heli script for VC2.
I finally got the UHD1.C working, but now the Heli script gives this error: "Line 65: Function body redefinition"
Do anybody know what it mean?
 
Silent Bob
Can you post the script here?

The one i know is this one:

Spoiler:
Download source  Code
#define EXTERN
#include "../../../../../g/machines/uh1d/uh1d.c"
//these must be changed for other chopper then UH1D

#include <inc/sc_def.h>
#include <inc/shigor/library.cxx>
#include <inc/maxovo/!max_multiplayer.h>

#define PARTS_COUNT        3
char    OBJECT_NAME[PARTS_COUNT][32] =    {    "body.l1", "UH1B_Rotor_Main_LOD1", "UH1B_Rotor_Rear_LOD01"};
//these must be changed for other chopper then UH1D


#define ANIMATION    "levels\\frenchroute\\data\\frenchroute_mp\\manm\\test.manm"
//path to the animation


#define SYNCH_CHOPPERTIMER    15

dword    S_timer;
dword    C_timer;

dword    MANM;
float    animlength;

float    gTime=0;

int        status=0;

s_SC_NOD_transform        current_trans;
s_SC_NOD_transform        original_trans[4];


//in revolutions per second

#define MAINROTOR_SPEED        4
#define REARROTOR_SPEED    12


BOOL isserver(){
    if (!SC_IsMpGame()) return FALSE;
    if (SC_IsMpClient()) return FALSE;
    return TRUE;
}

void Rotors_tick(sc_nod master_nod,float time){
    s_SC_NOD_transform tran;
    sc_nod nod,dum;
    c_Vector3 vec;

    //mainrotor
            dum = SC_NOD_Get(master_nod,OBJECT_NAME[1]);
            SC_NOD_GetTransform(dum,&tran);
            tran.rot.z+=(MAINROTOR_SPEED*6.18*time);
            SC_NOD_SetTransform(dum,&tran);
   
    //rearrotor
            dum = SC_NOD_Get(master_nod,OBJECT_NAME[2]);
            SC_NOD_GetTransform(dum,&tran);
            tran.rot.x+=(REARROTOR_SPEED*6.18*time);
            SC_NOD_SetTransform(dum,&tran);
}


int ScriptMain(s_SC_OBJ_info *info) {
int                        i,j;
char                    buffer[64];
s_SC_Expl_CreateInfo    exploinfo;
s_SC_MarokObjState        marokstate;
c_Vector3                vec;

    switch(info->message) {
        case SC_OBJ_MSG_INIT:
            SC_Marok_MakeStatic(SC_NOD_Get(info->master_nod, OBJECT_NAME[0]));           
            MANM = SC_MANM_Create(ANIMATION);
            animlength=SC_MANM_GetLength(MANM,0);
           
            gTime=0;
            if (isserver()) {
                SC_MP_Synch_Create(SYNCH_CHOPPERTIMER, &S_timer, sizeof(S_timer));
            } else {
                SC_MP_Synch_Create(SYNCH_CHOPPERTIMER, &C_timer, sizeof(C_timer));
            }
           
           
            SC_NOD_GetTransform(info->master_nod, &original_trans[0]);
            for (i=0;i<3;i++)
                    SC_NOD_GetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);                                       


            if (MAX_MUL_get_actual_mp_mode() == GAME_TYPE_COOP) {
                current_trans.loc.x = 0.0;
                current_trans.loc.y = 0.0;
                current_trans.loc.z = 0.0;
                current_trans.rot.x = 0.0;
                current_trans.rot.y = 0.0;
                current_trans.rot.z = 0.0;
                current_trans.scale.x=1;
                current_trans.scale.y=1;
                current_trans.scale.z=1;
                status = 1;
           
            } else {
                current_trans.loc.x = 0.0;
                current_trans.loc.y = 0.0;
                current_trans.loc.z = -1000.0;
                current_trans.rot.x = 0.0;
                current_trans.rot.y = 0.0;
                current_trans.rot.z = 0.0;
                current_trans.scale.x=1;
                current_trans.scale.y=1;
                current_trans.scale.z=1;
                status = 2;
                SC_DUMMY_Set_DoNotRenHier2(info->master_nod,TRUE);

            }
            SC_NOD_SetTransform(info->master_nod, &current_trans);                                               
           

//            SC_ObjScript_SetFlags(info->master_nod, SC_ObjScript_GetFlags(info->master_nod));
            info->next_exe_time = 0.0;

            break;

        case SC_OBJ_MSG_RELEASE:
            SC_MP_Synch_Remove(SYNCH_CHOPPERTIMER);
            SC_NOD_SetTransform(info->master_nod, &original_trans[0]);
            for (i=0;i<3;i++)
                SC_NOD_SetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);
            SC_MANM_Release(MANM);       

            break;

        case SC_OBJ_MSG_JUSTLOADED:
            MANM = SC_MANM_Create(ANIMATION);
            SC_Marok_MakeStatic(SC_NOD_Get(info->master_nod, OBJECT_NAME[0]));
            current_trans.loc.x = 0.0;
            current_trans.loc.y = 0.0;
            current_trans.loc.z = 0.0;
            current_trans.rot.x = 0.0;
            current_trans.rot.y = 0.0;
            current_trans.rot.z = 0.0;
            current_trans.scale.x=1;
            current_trans.scale.y=1;
            current_trans.scale.z=1;
            SC_NOD_SetTransform(info->master_nod, &current_trans);                                               
            SC_MANM_Set(MANM, 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), gTime);
            break;

        case SC_OBJ_MSG_HIT:           
            break;

        case SC_OBJ_MSG_DOTICK:
            info->next_exe_time = 0.0;
            switch (status){
            case 1:
                //flying
                if (isserver()){
                    gTime += info->elapsed_time;
                    S_timer = gTime;
                    SC_MP_Synch_SendChanges(SYNCH_CHOPPERTIMER, TRUE);
//                    SC_sgf(GVARSYNCED,gTime);
                } else {
                    //gTime = SC_ggf(GVARSYNCED);
                    gTime = gTime + info->elapsed_time;
                    if (C_timer>gTime)
                        gTime = C_timer;
                }

                SC_MANM_Set(MANM, 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), gTime);
                if (gTime > animlength){
                    //animation ended, so do something about it. now it loops
                    gTime=0;
                   
                    //commented code would release the chopper and move it to the original place
/*
                    Emitor_Release();
                    SC_NOD_GetWorldPos(SC_NOD_Get(info->master_nod,OBJECT_NAME[0]),&vec);
                    SC_SND_PlaySound3D(3159,&vec);
                    gTime=0;
                    status=2;                   
                    SC_NOD_SetTransform(info->master_nod, &original_trans[0]);
                    for (i=0;i<3;i++)
                        SC_NOD_SetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);
                    SC_MANM_Set(MANM[0], 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), 0);
                    SC_DUMMY_Set_DoNotRenHier2(info->master_nod,TRUE);*/
                    return FALSE;
                }
            }
           
            Rotors_tick(info->master_nod, info->elapsed_time);
            break;

    }// switch(info->event_type)
   
    return ScriptMain_inc(info);

}// int ScriptMain(s_OBJ_info *info)


Edited by Silent Bob on 06-07-2011 17:21
 
www.vietcong.info
Desty
Sure.

HELI.C

Spoiler:
Download source  Code
#define EXTERN
#include "levels\rescue_continue\data\rescue\scripts\uhd1.c"
//these must be changed for other chopper then UH1D

#include <inc/sc_def.h>
#include <inc/shigor/library.cxx>
#include <inc/maxovo/!max_multiplayer.h>

#define PARTS_COUNT        3
char    OBJECT_NAME[PARTS_COUNT][32] =    {    "body.l1", "UH1B_Rotor_Main_LOD1", "UH1B_Rotor_Rear_LOD01"};
//these must be changed for other chopper then UH1D


#define ANIMATION    "levels\\rescue_continue\\data\\rescue\\manm\\heli.manm"
//path to the animation


#define SYNCH_CHOPPERTIMER    15

dword    S_timer;
dword    C_timer;

dword    MANM;
float    animlength;

float    gTime=0;

int        status=0;

s_SC_NOD_transform        current_trans;
s_SC_NOD_transform        original_trans[4];


//in revolutions per second

#define MAINROTOR_SPEED        4
#define REARROTOR_SPEED    12


BOOL isserver(){
    if (!SC_IsMpGame()) return FALSE;
    if (SC_IsMpClient()) return FALSE;
    return TRUE;
}

void Rotors_tick(sc_nod master_nod,float time){
    s_SC_NOD_transform tran;
    sc_nod nod,dum;
    c_Vector3 vec;

    //mainrotor
            dum = SC_NOD_Get(master_nod,OBJECT_NAME[1]);
            SC_NOD_GetTransform(dum,&tran);
            tran.rot.z+=(MAINROTOR_SPEED*6.18*time);
            SC_NOD_SetTransform(dum,&tran);
   
    //rearrotor
            dum = SC_NOD_Get(master_nod,OBJECT_NAME[2]);
            SC_NOD_GetTransform(dum,&tran);
            tran.rot.x+=(REARROTOR_SPEED*6.18*time);
            SC_NOD_SetTransform(dum,&tran);
}


int ScriptMain(s_SC_OBJ_info *info) {
int                        i,j;
char                    buffer[64];
s_SC_Expl_CreateInfo    exploinfo;
s_SC_MarokObjState        marokstate;
c_Vector3                vec;

    switch(info->message) {
        case SC_OBJ_MSG_INIT:
            SC_Marok_MakeStatic(SC_NOD_Get(info->master_nod, OBJECT_NAME[0]));           
            MANM = SC_MANM_Create(ANIMATION);
            animlength=SC_MANM_GetLength(MANM,0);
           
            gTime=0;
            if (isserver()) {
                SC_MP_Synch_Create(SYNCH_CHOPPERTIMER, &S_timer, sizeof(S_timer));
            } else {
                SC_MP_Synch_Create(SYNCH_CHOPPERTIMER, &C_timer, sizeof(C_timer));
            }
           
           
            SC_NOD_GetTransform(info->master_nod, &original_trans[0]);
            for (i=0;i<3;i++)
                    SC_NOD_GetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);                                       


            if (MAX_MUL_get_actual_mp_mode() == GAME_TYPE_COOP) {
                current_trans.loc.x = 0.0;
                current_trans.loc.y = 0.0;
                current_trans.loc.z = 0.0;
                current_trans.rot.x = 0.0;
                current_trans.rot.y = 0.0;
                current_trans.rot.z = 0.0;
                current_trans.scale.x=1;
                current_trans.scale.y=1;
                current_trans.scale.z=1;
                status = 1;
           
            } else {
                current_trans.loc.x = 0.0;
                current_trans.loc.y = 0.0;
                current_trans.loc.z = -1000.0;
                current_trans.rot.x = 0.0;
                current_trans.rot.y = 0.0;
                current_trans.rot.z = 0.0;
                current_trans.scale.x=1;
                current_trans.scale.y=1;
                current_trans.scale.z=1;
                status = 2;
                SC_DUMMY_Set_DoNotRenHier2(info->master_nod,TRUE);

            }
            SC_NOD_SetTransform(info->master_nod, &current_trans);                                               
           

            //SC_ObjScript_SetFlags(info->master_nod, SC_ObjScript_GetFlags(info->master_nod));
            info->next_exe_time = 0.0;

            break;

        case SC_OBJ_MSG_RELEASE:
            SC_MP_Synch_Remove(SYNCH_CHOPPERTIMER);
            SC_NOD_SetTransform(info->master_nod, &original_trans[0]);
            for (i=0;i<3;i++)
                SC_NOD_SetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);
            SC_MANM_Release(MANM);       

            break;

        case SC_OBJ_MSG_JUSTLOADED:
            MANM = SC_MANM_Create(ANIMATION);
            SC_Marok_MakeStatic(SC_NOD_Get(info->master_nod, OBJECT_NAME[0]));
            current_trans.loc.x = 0.0;
            current_trans.loc.y = 0.0;
            current_trans.loc.z = 0.0;
            current_trans.rot.x = 0.0;
            current_trans.rot.y = 0.0;
            current_trans.rot.z = 0.0;
            current_trans.scale.x=1;
            current_trans.scale.y=1;
            current_trans.scale.z=1;
            SC_NOD_SetTransform(info->master_nod, &current_trans);                                               
            SC_MANM_Set(MANM, 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), gTime);
            break;

        case SC_OBJ_MSG_HIT:           
            break;

        case SC_OBJ_MSG_DOTICK:
            info->next_exe_time = 0.0;
            switch (status){
            case 1:
                //flying
                if (isserver()){
                    gTime += info->elapsed_time;
                    S_timer = gTime;
                    SC_MP_Synch_SendChanges(SYNCH_CHOPPERTIMER, TRUE);
//                    SC_sgf(GVARSYNCED,gTime);
                } else {
                    //gTime = SC_ggf(GVARSYNCED);
                    gTime = gTime + info->elapsed_time;
                    if (C_timer>gTime)
                        gTime = C_timer;
                }

                SC_MANM_Set(MANM, 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), gTime);
                if (gTime > animlength){
                    //animation ended, so do something about it. now it loops
                    gTime=0;
                   
                    //commented code would release the chopper and move it to the original place
/*
                    Emitor_Release();
                    SC_NOD_GetWorldPos(SC_NOD_Get(info->master_nod,OBJECT_NAME[0]),&vec);
                    SC_SND_PlaySound3D(3159,&vec);
                    gTime=0;
                    status=2;                   
                    SC_NOD_SetTransform(info->master_nod, &original_trans[0]);
                    for (i=0;i<3;i++)
                        SC_NOD_SetTransform(SC_NOD_Get(info->master_nod,OBJECT_NAME[i]),&original_trans[i+1]);
                    SC_MANM_Set(MANM[0], 0, SC_NOD_Get(info->master_nod,OBJECT_NAME[0]), 0);
                    SC_DUMMY_Set_DoNotRenHier2(info->master_nod,TRUE);*/
                    return FALSE;
                }
            }
           
            Rotors_tick(info->master_nod, info->elapsed_time);
            break;

    }// switch(info->event_type)
   
    return ScriptMain_inc(info);

}// int ScriptMain(s_OBJ_info *info)




UHD1.C

Spoiler:
Download source  Code
// ************************************************************************************************************************ //
//   
//   File:         Heli.cxx
//   Description:   Common code used by helicopters. It's controlled by messages sent by SC_ObjectScriptMessage()
//   Author:         Beny
//   
// ************************************************************************************************************************ //


#include <inc\sc_global.h>
#include <inc\b&a\Common.h>


#ifndef   ROTOR_NAME
#define   ROTOR_NAME      "UH1B_Rotor_Main_LOD1"
#endif

#ifndef   PHS_NAME
#define   PHS_NAME      "body.l1"
#endif



#ifndef   SND_HELI
#define   SND_HELI   2367
#endif



//++ Globals ++
dword   gPhase = GP_IDLE;
dword   g_hManm = NULL, g_iObject = 0;
dword   g_sndEmitor = 0;
float   g_tmAnmLen = 0, g_tmAnmCurTime = 0;
s_SC_NOD_transform   trHeli, trRotor;




void RotorsTick(s_SC_OBJ_info *info)
{
   sc_nod   node;
   s_SC_NOD_transform   tr;


   node = SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME);

   SC_NOD_GetTransform(node, &tr);

   tr.rot.z += (info->elapsed_time * 3.14f) * 10;

   SC_NOD_SetTransform(node, &tr);
}



//
int ScriptMain(s_SC_OBJ_info *info)
{
   s_SC_Emitor_Create   emitor;
   s_SC_NOD_transform   trans;


   switch( info->message )
   {
   case SC_OBJ_MSG_DOTICK:
      //
      switch(gPhase)
      {
      case GP_OBJANIM_PLAY:
         if (g_tmAnmCurTime < g_tmAnmLen)
         {
            //
            SC_MANM_Set(g_hManm, g_iObject, info->master_nod, g_tmAnmCurTime);

            //
            RotorsTick(info);

            //
            if (g_sndEmitor)
            {
               SC_NOD_GetTransform(info->master_nod, &trans);
               SC_Emitor_Update(g_sndEmitor, &trans.loc);
            }

            g_tmAnmCurTime += info->elapsed_time;
            info->next_exe_time = 0.0f;
         }
         else
         {
            //send message to level.c after animation
            #ifdef SEND_MSG_AFTER_ANIM
               SC_LevelScriptMsg(SCM_OBJ_ANIMEND, SEND_MSG_AFTER_ANIM);
            #endif

            //set to original pos
            SC_NOD_SetTransform(info->master_nod, &trHeli);
            SC_NOD_SetTransform( SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME) , &trRotor);
            SC_NOD_Hide(info->master_nod, TRUE);

            //
            if (g_sndEmitor)
            {
               SC_Emitor_Remove(g_sndEmitor);
               g_sndEmitor = 0;
            }

            //release anim
            if (g_hManm)
            {
               SC_MANM_Release(g_hManm);
               g_hManm = NULL;
               g_iObject = 0;
            }

            info->next_exe_time = 1.0f;
            gPhase = GP_IDLE;
         }
         break;

      case GP_IDLE:
         info->next_exe_time = 1.0f;
         break;
      }
      break;

   case SC_OBJ_MSG_HIT:
      break;

   case SC_OBJ_MSG_MESSAGE:
      switch(info->param1)
      {
      case SCM_OBJ_PLAYANIM:
         //show the object
         SC_NOD_Hide(info->master_nod, FALSE);

         //Retrieve animation handles
         g_hManm = SC_MANM_Create((char*)info->param2);
         g_iObject = SC_MANM_GetIndex(g_hManm, (char*)info->param3);
         g_tmAnmLen = SC_MANM_GetLength(g_hManm, g_iObject);
         g_tmAnmCurTime = 0;

         //create emitor for sound
//         SC_SND_PlaySound3Dlink(2367, info->master_nod);
         CLEAR(emitor);
         emitor.store_in_save = TRUE;

         //get pos
         SC_MANM_Set(g_hManm, g_iObject, info->master_nod, g_tmAnmCurTime);
         SC_NOD_GetTransform(info->master_nod, &trans);
         emitor.pos = trans.loc;

         g_sndEmitor = SC_Emitor_Create(&emitor);

         //
         if (g_sndEmitor)
            SC_SND_PlaySound3Demitor(SND_HELI, g_sndEmitor);


         info->next_exe_time = 0.0f;
         gPhase = GP_OBJANIM_PLAY;
         break;

      case SCM_OBJ_STOPANIM:
         SC_NOD_SetTransform(info->master_nod, &trHeli);
         SC_NOD_SetTransform( SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME) , &trRotor);
         SC_NOD_Hide(info->master_nod, TRUE);

         //
         if (g_sndEmitor)
         {
            SC_Emitor_Remove(g_sndEmitor);
            g_sndEmitor = 0;
         }

         if (g_hManm)
         {
            SC_MANM_Release(g_hManm);
            g_hManm = NULL;
            g_iObject = 0;
         }

         info->next_exe_time = 1.0f;
         gPhase = GP_IDLE;
         break;
      }
      break;

   case SC_OBJ_MSG_INIT:
      //
      SC_Marok_MakeStatic( SC_NOD_GetNoMessage(info->master_nod, PHS_NAME) );

      //
      SC_NOD_GetTransform(info->master_nod, &trHeli);
      SC_NOD_GetTransform( SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME) , &trRotor);
      SC_NOD_Hide(info->master_nod, TRUE);
      break;

   case SC_OBJ_MSG_RELEASE:
      SC_NOD_SetTransform(info->master_nod, &trHeli);
      SC_NOD_SetTransform( SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME) , &trRotor);
      SC_NOD_Hide(info->master_nod, FALSE);

      //
      if (g_sndEmitor)
      {
         SC_Emitor_Remove(g_sndEmitor);
         g_sndEmitor = 0;
      }
      break;

   case SC_OBJ_MSG_JUSTLOADED:
      //
      SC_Marok_MakeStatic( SC_NOD_GetNoMessage(info->master_nod, PHS_NAME) );

      //
      SC_NOD_SetTransform(info->master_nod, &trHeli);
      SC_NOD_SetTransform( SC_NOD_GetNoMessage(info->master_nod, ROTOR_NAME) , &trRotor);
      SC_NOD_Hide(info->master_nod, TRUE);

      gPhase = GP_IDLE;         //po loadu vrtulniky nebudou
      break;

   }

   return 1;
}


 
KostiCZ
Redefinition means that you are trying to define some function which is already defined. Check in script which function it is (which line...) and then try to look inside include files if this function is already defined on another place... Voila, easy to fix. ;-)


EDIT: Now I can see it. Problem is ScriptMain() function. I don't understand your scripts (never scripted VC2), but it looks you have included one script to another. Is it right? Do you have two hueys with two different scripts or only one huey?
Edited by KostiCZ on 06-07-2011 22:17
Signature________________________________________________

2LT William Theolinus "KostiCZ" Boner Jr.
LRRP Squad Baker, Delta Team
cache.www.gametracker.com/player/KostiCZ/63.143.47.189:2302/b_560x95.png
 
Teamrespawn.cz
Desty
I got one huey.
 
KostiCZ
So why do you have two scripts? If one should be include file, then you have to delete scriptmain part or use only one script, not two
Edited by KostiCZ on 06-07-2011 23:09
Signature________________________________________________

2LT William Theolinus "KostiCZ" Boner Jr.
LRRP Squad Baker, Delta Team
cache.www.gametracker.com/player/KostiCZ/63.143.47.189:2302/b_560x95.png
 
Teamrespawn.cz
Desty
The removal of the scriptmain made it load the script.
But the rotors don't work and the pilot assigned to the huey gives an error.
Edited by Desty on 06-07-2011 23:22
 
Silent Bob
I once posted Luke´s script on the VET forums.....link
 
www.vietcong.info
KostiCZ
try to use heli.c script and delete there second line (include of uhd1.c file), there is rotor defined

about pilot - don't have idea, I never made scripts for vc2, but i think there are missing definitions of entry points/seats. I can help you with VC1 huey, but not with this one, sorry
Signature________________________________________________

2LT William Theolinus "KostiCZ" Boner Jr.
LRRP Squad Baker, Delta Team
cache.www.gametracker.com/player/KostiCZ/63.143.47.189:2302/b_560x95.png
 
Teamrespawn.cz
Ando
Silent Bob wrote:
I once posted Luke´s script on the VET forums.....link


If I remember right then there was some missing parts or just needed some small fixes.
Anyway I improved it a little and it was working.

I will search it later when I am behind PC.
 
Ando
For that script is missing one included script (#include "../../../../../g/machines/uh1d/uh1d.c" )

I improved that long time ago but it is still with bugs.
I tested my improved version today and there is missing sound and some warnings that MP sync. isn't released after map finish.
Visually all looks working and you can enter/ exit too.

I don't have time to finish or fix it, and don't want to upload it here because its not finished and with bugs.

But if you still want it, I will send it with PM.
Edited by Ando on 07-07-2011 23:47
 
Chavez_US
I just uploaded all of the scripts from Indiglow site which utilized the helicopter in French Route for VC2...I am sure these scripts will contain information which will allow you to create a moving helicopter and the seating for the pilots and people in the chopper.
 
daan24
im now just wondering, which scripts do you need? i see some uhd1.c copper.c pilot1.c etc which ones do you need?
Edited by daan24 on 18-03-2012 12:52
SignatureEverything can and will be solved with dynamite
 
Chavez_US
daan24 wrote:
im now just wondering, which scripts do you need? i see some uhd1.c copper.c pilot1.c etc which ones do you need?


Appears you need at least 4 in your mapname/data/mapname/scripts folder (Copter.c, Crew.c, Pilot1.c, and pilot2.c)

AND

inc/shigor/ussoldier.cxx
inc/sc_def.h
inc/maxovo/!max_multiplayer.h

Look at the header of copter.c:

Download source  Code

#define EXTERN
#include "../../../../../g/machines/uh1d/uh1d.c"
//these must be changed for other chopper then UH1D

#include <inc/sc_def.h>
#include <inc/shigor/library.cxx>
#include <inc/maxovo/!max_multiplayer.h>

#define PARTS_COUNT      3
char   OBJECT_NAME[PARTS_COUNT][32] =   {   "body.l1", "UH1B_Rotor_Main_LOD1", "UH1B_Rotor_Rear_LOD01"};
//these must be changed for other chopper then UH1D


#define ANIMATION   "levels\\frenchroute\\data\\frenchroute_mp\\manm\\test.manm"
//path to the animation





Then crew.cxx
Download source  Code

#define GROUP 5
#define VEHICLENAME "uh1d"
#include <inc\shigor\ussoldier.cxx>





Then pilot1
Download source  Code

#define GROUP 5
#define VEHICLENAME "uh1d"
#include <inc\shigor\ussoldier.cxx>





Then pilot2
Download source  Code

#define MEMBERID 2
#define NAME_NR      2745
#define VEHICLELINK 1
#define IMMORTAL
#define CLASS 7
#define AIFLAG 15
#include "crew.cxx"





additionally you will need 4 .MANM files created in 3dsmax: HQMACV_CRASH.MANM, HQMACV_LOOP1.MANM, HQMACV_PRELOOP.MANM, and TEST.MANM.

The code i uploaded is original code (with comments) added into the script. Luke did this so me and Andy would understand what is happening. Have you opened and looked at all the commenting Luke did in the scripts i uploaded?

I just uploaded the file for FrenchRoute to www.vietcong-coop..., You can open it in your editor, check out where things are, finalize it, and see how Luke got the helicopter working in that map...

Rick (Chavez_US)
Edited by Chavez_US on 18-03-2012 17:32
 
daan24
ok thx for the help, i will check it out
SignatureEverything can and will be solved with dynamite
 
daan24
i still dont know how to make the chopper work, i tried alot of stuff but couldnt get it to work, i couldnt open the frenchroute map in the editor it self becuase it gave an error

can you show me how to do it picture by picture (if you still know how to do it)? like they explained how to make ctf in vc2 on the vet forums
SignatureEverything can and will be solved with dynamite
 
daan24
daan24 wrote:
i still dont know how to make the chopper work, i tried alot of stuff but couldnt get it to work, i couldnt open the frenchroute map in the editor it self becuase it gave an error

can you show me how to do it picture by picture (if you still know how to do it)? like they explained how to make ctf in vc2 on the vet forums


nvm, got an awnser
SignatureEverything can and will be solved with dynamite
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Multiplayer Game Script Vietcong Tech Talk 4 22-06-2019 19:31
Problems with some servers General Discussion 10 12-07-2017 06:26
MP sync. script discussion Maps & Mapping 89 26-04-2016 09:40
Ando door script Maps & Mapping 4 25-10-2015 19:50
ADM script Maps & Mapping 3 03-12-2014 14:23
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Render time: 0.43 seconds - 78 Queries 5,471,554 unique visits