spamurai 3 Posted April 23, 2008 More basic questions: Todays example is a tank that serves as an endgame goal for a mission. I need to monitor the tank throughout the mission and perhaps update the players about it's status during certain events. 1) I know about getdammage <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getdammage _tank Would fetch me the current damage on the _tank from 0.0 to 1.0. How do I fetch this information whenever the tank gets hit? In other words, whenever _tank gets hit, ArmA broadcasts a hint like "Your Tank is taking hits!"? ---------------- The next question about vehicles is regarding a way of imitating a the state of _tank having a broken track. Is there a way to break a tanks track, and just it's track, as an event? Right now I just adjust the vehicles fuel level to nearly zero with setfuel to keep the _tank from driving around. However, it would be nice to keep the engine running and the vehicle might run out of fuel before the mission is over (and I don't want the AI complaining it's out of fuel all mission long). How would a command to refuel the vehicle once in a while look like? ---------------- Is there a simple way to modify the attributes of a unique instance of a vehicle during a mission? For example, making the objective _tank invincible so it isn't destroyed during a cutscene or increasing it's Armour value so it can take a few more hits then normal without changing all similar vehicles to be the same? I was thinking of just making a new custom vehicle using the originals model (is there a tutorial for just modifying the stats?) Share this post Link to post Share on other sites
lebson506th 0 Posted April 23, 2008 1. tank addEventHandler ["hit", {hint "Your tank is taking fire!"}]; tank addEventHandler ["damaged", {hint "Your tank is taking fire!"}]; Try those 2. and 3. Not sure Share this post Link to post Share on other sites
spamurai 3 Posted April 23, 2008 1.tank addEventHandler ["hit", {hint "Your tank is taking fire!"}]; tank addEventHandler ["damaged", {hint "Your tank is taking fire!"}]; Try those 2. and 3. Not sure thanks I kind of expected this would be some sort of eventhandler, I was reading This Thread about them and they seem to get complicated pretty quick in Multiplayer. However, very useful none the less. Share this post Link to post Share on other sites
ZNorQ 0 Posted April 25, 2008 Ref the link to the OFPEC thread; Remember, those where the old Flashpoint days, I'm pretty sure much have changed since then. Share this post Link to post Share on other sites
LtCmdrBoon 0 Posted April 27, 2008 3. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> tank addEventHandler ["hit", {tank setdammage 0}]; tank addEventHandler ["damaged", {tank setdammage 0}]; there's your invincible tank. as for busting parts of tanks (or any vehicle), the only way i know how is with a lot of trial and error, setpos explosives relative to objects centre (eg to take out a tail rotor might be 3 nades 10m behind getpos of chopper). As for unlimited fuel, your almost there with how u empty it. i'm not upto sqf yet, but this will do it in sqs init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "fuel.sqs" fuel.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #ere tank setfuel 1 ~120 goto "ere" Share this post Link to post Share on other sites
beta 0 Posted April 27, 2008 For a never-ending fuel solution, you could try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> tank addEventHandler ["Fuel", {tank setFuel 1;}]; Place that in a script or the vehicle's init line, when "tank" has 0 fuel, "tank" will be refueled to full. Share this post Link to post Share on other sites