major_upset 0 Posted September 23, 2007 First searching the forums as produced nothing. I've made a little mission where you fly around and kill stuff in a Hind. (The RHS port to ArmA) no problems there, but I want to set up supply bases so the player can land rearm, refuel and repair his Hind and get back in to the fight. I've tried: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hind1 setfuel 1; hind1 setVehicleAmmo 1 In the On act field of a trigger when the hind is in said trigger, but nothing happerns. I've also tried.... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit AddMagazine ["RHS_12_7mmGun",100] _unit AddMagazine ["RHS_AT2",100] _unit AddMagazine ["RHS_Rocket57x128",100] But it just gives me a load of error text in the top left hand of the screen. Any help would be great... Share this post Link to post Share on other sites
wokstation 0 Posted September 23, 2007 I believe it's not working because you're attempting to perform a "cheat" action on the player. One workaround for this would be to have the player leave the helicopter and then perform the actions on the empty vehicle or remove the vehicle entirely and replace it with a fresh one. So you could set up the trigger area with a hint, saying "Get out of the vehicle while repairs are initiated". Then listen for the player getting out and when they have... fix the helicopter and order them to get back in. The other errors are because you're not using the command correctly: http://community.bistudio.com/wiki/addMagazine <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addMagazine "M16" So in your example, you'd want: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hind1 addMagazine "RHS_12_7mmGun"; hind1 addMagazine "RHS_AT2"; hind1 addMagazine "RHS_Rocket57x128"; Share this post Link to post Share on other sites
major_upset 0 Posted September 23, 2007 I believe it's not working because you're attempting to perform a "cheat" action on the player. Â One workaround for this would be to have the player leave the helicopter and then perform the actions on the empty vehicle or remove the vehicle entirely and replace it with a fresh one.So you could set up the trigger area with a hint, saying "Get out of the vehicle while repairs are initiated". Â Then listen for the player getting out and when they have... fix the helicopter and order them to get back in. The other errors are because you're not using the command correctly: http://community.bistudio.com/wiki/addMagazine <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addMagazine "M16" So in your example, you'd want: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hind1 addMagazine "RHS_12_7mmGun"; hind1 addMagazine "RHS_AT2"; hind1 addMagazine "RHS_Rocket57x128"; Ok thanks I give it a try. Share this post Link to post Share on other sites
wokstation 0 Posted September 23, 2007 One other thing, and it's only theory (I've not tested this, I'm very new to this game) - if you spawn the vehicle as an empty one, spawn the player seperately then either order them in or do "player moveInDriver hind1" on the unit's init, the game may not see the helicopter as the player, in which case the "cheat actions" would work on it. Of course, I could be utterly wrong and the game detects that it's now a player-unit... Share this post Link to post Share on other sites