Jump to content

Recommended Posts

Hello there!

 

I'm working on a remake of the "East Wind" campaign where I replace every NATO unit with a Bundeswehr unit (BWMod).

I'm currently working on the first mission of the campaign, now here's my problem:

  • There's a game logic entity where MacKinnon's vehicle is supposed to lie on the side.
  • I replaced the Hunter with an Eagle.
  • Now when I'm starting the mission, the Eagle is stuck in the ground.

Mods:

  • BWMod
  • Bundeswehr ReTex Pack
  • CBA_A3

I'm not a programming god and I have no idea how to fix this issue! Any ideas?

 

Thanks in advance!

 

Images:

Game Logic in editor: https://ibb.co/2YqB3Rm

How it looks like in the mission: https://ibb.co/9y1k8wy

Game logic code: https://ibb.co/YWs2tLc

Vehicle code: https://ibb.co/PgFG74h

 

PS: Sorry for my english skills...

Share this post


Link to post
Share on other sites

could you post the code in a code block instead as a picture next time pls? I don't like to copy ur code by manually writing it.

 

In your vehicle code you can adjust the positions Z value. I guess you posted code from mission.sqm. There the position format is [X,Z,Y]. But maybe you could just change the height in Eden?

Share this post


Link to post
Share on other sites
Quote
2 hours ago, sarogahtyp said:

could you post the code in a code block instead as a picture next time pls?

Didn't know that works tbh ._.

class Item7
{
	side="WEST";
	class Vehicles
	{
		items=1;
		class Item0
		{
			position[]={5031.0117,214.66179,5886.9077};
			azimut=180;
			special="NONE";
			id=11;
			side="WEST";
			vehicle="BWA3_Eagle_Tropen";
			leader=1;
			lock="LOCKED";
			skill=0.2;
			text="BIS_offTruck";
			init="clearWeaponCargo this; clearMagazineCargo this; clearItemCargo this; clearBackpackCargo this; this setCaptive true; this setBehaviour ""CARELESS""; this engineOn true";
		};
	};
};

 

class Item92
{
	side="LOGIC";
	class Vehicles
	{
		items=1;
		class Item0
		{
			position[]={5690.8989,100.55788,5313.7993};
			azimut=-120.07909;
			special="NONE";
			id=128;
			side="LOGIC";
			vehicle="Logic";
			leader=1;
			skill=0.2;
			text="BIS_logic2";
		};
	};
};

Changing the height of both, the vehicle and the game logic entity, didn't do anything. It's still stuck in the ground.

I forgot to say that BIS_offTruck is starting position is at Camp Rogain

 

Images

BIS_offTruck starting Position: https://ibb.co/7XKRv25

Share this post


Link to post
Share on other sites

try to add this in the vehicles init line:

_pos_corr = getPos this; _pos_corr resize 2; _d = _pos_corr pushBack 0.1;  this setPos _pos_corr;

gets vehicles position, deletes Z value, adds a Z value of 0.1 (10 cm), sets vehicle to new position.

 

how do you rotate the vehicle aound its y-axis?

Share this post


Link to post
Share on other sites

Thanks, but it's still not working.

Can i give you the pbo file of the mission so it's easier to figure out whats wrong?

Share this post


Link to post
Share on other sites
3 minutes ago, Mixuray said:

Can i give you the pbo file of the mission so it's easier to figure out whats wrong?

no .pbo pls. you could do a zip file with the un-pbo-ed mission in it.

Share this post


Link to post
Share on other sites

Problem could be in initMission.hpp in function BIS_crashSite. there the position of the BIS_offTruck is set with a Z-value of -0.8. this should be 0 or 0.1:

 

BIS_crashSite = {
	// Kill driver and commander
	{_x setDamage 1} forEach [BIS_officer, BIS_offTruckD];
	
	// Set up truck
	BIS_offTruck enableSimulation false;
	["Seting the truck up:%1", 1] call BIS_fnc_LogFormat;
	/*
	BIS_offTruck setPos [5690.8989,5313.7993,-0.5];
	BIS_offTruck setDir 125;
	BIS_offTruck engineOn false;
	*/
	
	[] spawn {
		scriptName "initMission.hpp: BIS_crashSite";
		
		// Move the truck into position
		sleep 2;
		
		BIS_offTruck setPos [5690.8989,5313.7993,-0.8];  // <<<------- HERE change Z to 0 instead of -0.8
		BIS_offTruck setDir 125;
		[BIS_offTruck, 2, 265] call BIS_fnc_setPitchBank;
		BIS_offTruck setDamage 0.7;
		{BIS_offTruck setHitPointDamage [_x, 1]} forEach ["HitRFWheel", "HitRF2Wheel", "HitLF2Wheel"];
		BIS_offTruck allowDamage false;
		BIS_offTruck engineOn false;
	};
	
	// Add engine smoke
	BIS_truckSmoke = "#particlesource" createVehicle [10,10,10];
	BIS_truckSmoke setParticleClass "WreckSmokeSmall";
	BIS_truckSmoke attachTo [BIS_logic2, [-1.4,-0.4,1.6]];
	
	// Add smoke sound
	BIS_truckSmokeSound = createSoundSource ["Sound_SmokeWreck1", [10,10,10], [], 0];
	BIS_truckSmokeSound attachTo [BIS_logic2, [-1.4,-0.4,1.6]];
	
	// Unhide commander
	BIS_officer hideObject false;
	BIS_officer enableSimulation true;
	
	// Create mine
	BIS_truckMine = "ATMine_Range_Ammo" createVehicle [5680.392,5314.729,0.000];
};

changes in init line of that vehicle can be reversed.

  • Thanks 1

Share this post


Link to post
Share on other sites

I'm trying it!

 

EDIT: It works!!! Thank you so much man!

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×