MEXICO SCRIPTS PROBLEM
GONZO
Posted on 14-02-2016 12:17
Offline
Member
Posts: 69
Joined: 29.11.14
Location: Karviná
Gender: male
Age: 47
Warnings:
Hello.
I almost finished the map Pueblo. But I found bug. It is probably the multiplayer synchronization. I exported the map and erased all residues from editing.
After starting the game everything is fine. But when I uploaded the map on the server and connected to it, mexico hats and glasses (US equipment) disappeared.
Maybe it is some small error in scripts. Could someone help me?
I made standard vc script:
#define ID_GROUP 1
#define ID_MEMBER 16
#define PPISTOL 0
#define PWEAPON1 0
#define PWEAPON2 0
#define PWEAPONSLOT1 0
#include "mexico1vcbasic.inc"
mexico1vcbasic.inc:
#include <inc\sc_global.h>
#include <inc\sc_def.h>
#define PVANGLE 3.0f
#define PVANGLENEAR 4.0f
//settings of difficulties
#ifndef D0_SHOOT_PREC
#define D0_SHOOT_PREC 1.5f
#endif
#ifndef D1_SHOOT_PREC
#define D1_SHOOT_PREC 1.0f
#endif
#ifndef D2_SHOOT_PREC
#define D2_SHOOT_PREC 0.3f
#endif
#ifndef D3_SHOOT_PREC
#define D3_SHOOT_PREC 0.0f
#endif
dword gPhase = 0;
void equipplayer(s_SC_P_CreateEqp *eqp, int *count){
eqp[0].bes = "G\\EQUIPMENT\\Us\\bes\\EOP_e_maceta01.bes";
eqp[0].eqp = "G\\EQUIPMENT\\Us\\eqp\\CUP_SFgncsldr03\\sniper\\EOP_e_maceta01.eqp";
eqp[1].bes = "G\\EQUIPMENT\\Vc\\bes\\EOP_e_canteen01VC.bes";
eqp[1].eqp = "G\\EQUIPMENT\\Vc\\eqp\\CVP_uniformVC04\\KAM70-1\\EOP_e_canteen01VC.eqp";
eqp[2].bes = "G\\EQUIPMENT\\us\\bes\\EOP_HAT8US_V01.BES";
eqp[2].eqp = "G\\EQUIPMENT\\Vc\\eqp\\EOP_VH05PH06_01.EQP";
eqp[3].bes = "G\\EQUIPMENT\\Us\\bes\\EOP_e_sunglasses02.bes";
eqp[3].eqp = "G\\EQUIPMENT\\Us\\eqp\\CUP_SFgncsldr03\\engineer\\EOP_e_sunglasses02.eqp";
*count=4;
}
int ScriptMain(s_SC_P_info *info)
{
s_SC_P_Create pinfo;
s_SC_P_CreateEqp eqp[10];
int eqpcount;
s_SC_P_AI_props props;
s_SC_P_getinfo plInfo;
c_Vector3 plPos;
dword i, j;
info->next_exe_time = 0.5f;
switch( info->message )
{
case SC_P_MES_TIME:
switch( gPhase )
{
case 0:
CLEAR(pinfo);
CLEAR(eqp);
pinfo.type = SC_P_TYPE_AI;
pinfo.side = SC_P_SIDE_VC;
pinfo.group = ID_GROUP;
pinfo.member_id = ID_MEMBER;
pinfo.inifile = "ini\\players\\POORVC.INI";
pinfo.name_nr = 55999;
pinfo.icon_name = "nhut";
pinfo.weap_knife = 33;
pinfo.weap_pistol = PPISTOL;
pinfo.weap_main1 = PWEAPON1;
pinfo.weap_main2 = PWEAPON2;
pinfo.weap_slot1 = PWEAPONSLOT1;
pinfo.recover_pos = info->pos;
pinfo.debrief_group = SC_P_DEBRIEFGROUP_VC;
pinfo.flags=SC_P_CREATE_FL_DISABLE_EQPGEN;
equipplayer(eqp,&eqpcount);
pinfo.eqps = eqpcount;
pinfo.eqp=eqp;
info->pl_id = SC_P_Create(&pinfo);
gPhase = 1;
break;
case 1:
if ( !SC_P_IsReady(info->pl_id) )
return 0;
SC_P_Ai_EnableShooting(info->pl_id, TRUE);
SC_P_Ai_SetPeaceMode(info->pl_id, SC_P_AI_PEACEMODE_HOLD);
SC_P_Ai_SetBattleMode(info->pl_id, SC_P_AI_BATTLEMODE_ATTACK);
SC_P_Ai_SetMode(info->pl_id, SC_P_AI_MODE_BATTLE);
CLEAR(props);
SC_P_Ai_GetProps(info->pl_id, &props);
props.coveramount = 0.9f;
props.extend_searchway = TRUE;
props.shortdistance_fight = 0.0f;
props.view_angle = PVANGLE;
props.view_angle_near = PVANGLENEAR;
props.hear_distance_max = 70; //this should match the scene visibility distance
props.shoot_imprecision = 0;
props.shoot_damage_mult = 1.3f;
props.max_vis_distance = 68; //this should be 2 meters less than scene visibility distance
props.peace_fakeenemy_run = 1;
props.peace_fakeenemy_phase = 0.5f;
props.reaction_time = 0.01f;
props.scout = 0.1f;
props.berserk = 0.1f;
props.boldness = 7 + frnd(4.0f);
//set by difficulty
switch( SC_ggi(SGI_DIFFICULTY) )
{
case 0:
props.shoot_imprecision = D0_SHOOT_PREC; //overload previous (default) setting
props.shoot_damage_mult = 0.5f;
props.grenade_throw_imprecision = 1.5f + frnd(0.5f);
break;
case 1:
props.shoot_imprecision = D1_SHOOT_PREC;
props.shoot_damage_mult = 1.0f;
props.grenade_throw_imprecision = 1.0f + frnd(0.5f);
break;
case 2:
props.shoot_imprecision = D2_SHOOT_PREC;
props.shoot_damage_mult = 1.1f;
props.grenade_throw_imprecision = 0.5f + frnd(0.5f);
break;
case 3:
props.shoot_imprecision = D3_SHOOT_PREC;
props.shoot_damage_mult = 1.2f;
props.grenade_throw_imprecision = 0.3f + frnd(0.3f);
break;
}
SC_P_Ai_SetProps(info->pl_id,&props);
gPhase = 2;
break;
case 2:
break;
}//switch( gPhase )
break; //case SC_P_MES_TIME:
case SC_P_MES_EVENT:
switch(info->param1)
{
case SCM_MP_REINIT:
if (gPhase != 1)
gPhase = 1;
break;
}
break;
}
return 1;
}
GONZO attached the following image:
[103.05 kB]
Edited by GONZO on 14-02-2016 12:19
Silent Bob
Posted on 15-02-2016 10:10
Offline
Admin
Posts: 931
Joined: 07.03.11
Location: Austria
Gender: male
Age: 48
Warnings:
just a guess: is the "mexico hat" part of the Fist Alpha addon and does the Server run Fist Alpha?
WEZ
Posted on 15-02-2016 23:03
Offline
Member
Posts: 192
Joined: 18.03.11
Gender: male
Age: 28
Warnings:
Hehehehe, remember good old times in 0.96 with Helicopter-hat
Signature -S.D.S.- WEZ
****************
Member of vietcong.info
Member of ALPHA-TEAM.cz
Member of Subgamers.com (R.I.P)
Member of 4cheaters.de (R.I.P.)
Member of unitedadmins.com (R.I.P.)
Member of eliteteamwork.proboards.com (R.I.P.)
Member of vietcong1.cz (R.I.P.)
Member of auscong.com (R.I.P.)
Member of friends-for-all.de (R.I.P.)
Member of vietcong.cz (R.I.P.)
Member of TS-Database (R.I.P.)
Member of neoseeker.com (R.I.P.)
Member of answers.microsoft.com (R.I.P.)
http://cache.gametracker.com/profile/sds-wez/
GONZO
Posted on 17-02-2016 18:58
Offline
Member
Posts: 69
Joined: 29.11.14
Location: Karviná
Gender: male
Age: 47
Warnings:
Hi again
I really thought it would be a problem of FA objects (like mexico hat). Thank you for the tip.
So I copied objects of equipment into my map directory LEVELS/GONZO/DATA/G_PUEBLO/MAXEQUIP/. Also its .eqp and .dds files.
In my mexico1vcbasic.inc I changed paths to these files:
void equipplayer(s_SC_P_CreateEqp *eqp, int *count){
eqp[0].bes = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_maceta01.bes";
eqp[0].eqp = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_maceta01.eqp";
eqp[1].bes = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_canteen01VC.bes";
eqp[1].eqp = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_canteen01VC.eqp";
eqp[2].bes = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_HAT8US_V01.BES";
eqp[2].eqp = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_VH05PH06_01.EQP";
eqp[3].bes = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_sunglasses02.bes";
eqp[3].eqp = "LEVELS\\GONZO\\DATA\\G_PUEBLO\\MAXEQUIP\\EOP_e_sunglasses02.eqp";
*count=4;
}
And of course I placed these objects in the map.
But it still does not work. I guess I'll have to give up.
Silent Bob
Posted on 19-02-2016 09:58
Offline
Admin
Posts: 931
Joined: 07.03.11
Location: Austria
Gender: male
Age: 48
Warnings:
You may try following for a test:
include all objects (.eqp and .dds) with the correct path´s into the map and repack it. Maybe the engine cant handle "custom file paths"