Jump to content
Sign in to follow this  
OChristie

How can this be done???

Recommended Posts

Hello,

I am currentley making an Addon for ArmA, and i have become very stuck at a certain point.

Now what this point is, is that i am trying to make my static object fir a tank round at a horizontal level, into the passing target, the only problem is, is that i dont no how to implement this, would it be through a script, or would it be through the Object Config???

Please can sanybody reply as i am really stuck and i would love to offer something to you guys that is worth using.....

blackknight63

config.cpp

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

class VBS2_EFP

{

units[] = {"VBS2_EFP"};

weapons[] = {};

};

};

class CfgVehicleClasses

{

class VBS2_EFP_STAT

{

displayName = "Explosivley Formed Penetrator";

};

};

class CfgVehicles

{

class Target;

class VBS2_EFP: Target

{

displayName = "EFP";

model = "\\EFP_BKNT\EFP";

icon = "\ca\data\data\Unknown_object.paa";

vehicleClass="EFP";

accuracy = 0.200000;

scope=2;

simulation="House";

camouflage=10;

Audible=10;

animated=0;

mapSize=0.2;

cost=100000000;

threat[]={1,1,1};

armor = 10;

irtarget=0;

lasertarget=0;

class EventHandlers

{

init="_this exec ""\EFP_BKNT\init.sqs""";

};

};

}

init.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_unit = _this select 0

_unit setpos [GetPos _unit select 0,(GetPos _unit select 1),+0.2];

exit

Please Help me somebody i am i really need some help!!!

Share this post


Link to post
Share on other sites
Quote[/b] ]dont no how to implement this, would it be through a script, or would it be through the Object Config???

Both ways are possible.

When scripting it, create a tankshell with createvehicle at the barrels position, set the direction with setDir and accelerate it with setVelocity. Then you need something that triggers it. That could be a useraction on the object or a triggerarea which runs the script when a target enters the area.

When doing it through the config, set your object up as a cannon like the D30 and M119. In its turret class you can set the elevation degrees of the barrel to 0, so it's always aiming horizontal. And as ammunition give it some sabot rounds instead of heat shells. To make it shoot, move an AI in as gunner moveInGunner, let it aim at the target doTarget and tell the AI to fire a round with the command fire.

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
Sign in to follow this  

×