Jump to content

bigduke6

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About bigduke6

  • Rank
    Private First Class
  1. Ah, that explains that. Thanks very much for the reply. I can stop banging my head now. Cheers, Mart
  2. Back again with another question for my replacement satchel charge scripts. I'm confused about a scripts ability to check a variable. When I create an explosive in the game I attach an action to it thus <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">pickupcharge1 = charge1 addAction ["Pick up explosive 1", "Pickupcharge1.sqs"] in case you change your mind and want to pick it up and set it somewhere else. No problem. Then in the script "Pickupcharge1.sqs" I check who activated the action and allocate it to a global variable thus <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">whopickedupcharge1 = _this select 1 I know the right variable is placed in there because if I show it in a hint <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format ["whopickedupcharge1 = %1",whopickedupcharge1] it correctly displays 'p1' (without the quotes). All good so far. But then in the script when I check on who picked it up so I know who to reallocate the charge to I use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? whopickedupcharge1 = p1 : p1placecharge1 = p1 addAction ["Place explosive 1", "Placecharge1.sqs"]; goto "End" ? whopickedupcharge1 = p2 : p2placecharge1 = p2 addAction ["Place explosive 1", "Placecharge1.sqs"]; goto "End" hint "Error in whopickedupcharge1" #End exit it doesn't seem able to match up with the soldiers and always falls through in to my error message, and doesn't reallocate the action. It feels like a really basic question, and probably is, but why can't the 'if' statements match up the check when the correct variable is in there? I have tried it with checking against p1 'p1' (p1) "p1" but just can't get it to work. I've tried making the variable local and global but neither way works. Any help greatfully recieved, to alleviate my flattened forehead from banging my head on the desk. Thanks, Mart
  3. Ah, apologies. I thought that code would add the action to the local p1 soldier, still leaving me the same problem when other soldiers came close. I was thinking of how to restrict it from other soldiers, when simply by restricting it from other computers you get the same effect. Hey presto. Thanks. Cheers, Mart
  4. Guys, thanks for the replies but maybe I didn't explain it enough as I think you've got the wrong idea. I can successfully add the action ONLY to the required player ( there is a series of action menu commands which the team leader uses to keep an explosive or issue it to one of his team, and the person so issued with each explosive gets a corresponding 'Place explosive 1', etc in their menu). The problem is if, say the team leader gives all the charges to soldier p1, and gives none to another soldier, say p2, when I teamswitch to soldier p2 while testing the mission, while he is away from soldier p1 everything is fine, there are no actions in his menu. The problem is when I move p2 close to p1 and look at him, the 'Place explosive 1', 'Place explosive 2' and 'Place explosive 3' actions appear in p2's action menu, even though he has no explosves. As soon as p2 looks away or moves away from p1 the action gets removed from the action menu. It's like if you add an action to an object, say a house, when you get close enough, I think 3m or 5m and look at it, the action appears in your action menu, and then gets removed if you look away or move too far away again. I can nullify the action by checking in the script who activated the action and if it's not the person carrying the appropriate explosive I can make it exit, but I'd rather keep it tidy and not have the action appear at all. Although, thinking about it now, if you can only do it while close enough to the other player and while looking at him, I suppose you could reason that you're getting the charge out of his backpack and setting it for him, while he's firing or something. Hmm, that's going to play havoc with my scripts though, having a different person setting a charge from the person carrying it.... But I'd still like to know if it's possible to stop added actions for one soldier appearing in another soldiers menu when he gets close. Regards, Mart
  5. Guys, I'm writing a few scripts for co-op MP to get round the fact that you can't detonate or use each others satchel charges if one player dies, and also the fact that you have to detonate them all at the same time rather than being able to blow one at a time. So, to cut a long story short as part of the process I have a script which does this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">p1placecharge1 = p1 addAction ["Place explosive 1", "Placecharge1.sqs"] where p1 is player1, etc, which works fine. The problem is when another player walks close and looks at the player with this action, the action also appears in their action menu, like if I'd added the acton to an object which could be used by anybody. Then can then place the charge which is on the other player, essentially nicking it off them. So, the question. How do I make the action only show up and therefore useable to the player I've actually added it to, rather than anyone who happens to be close enough and looking at them. Thanks in advance. Mart
  6. bigduke6

    Carrying a wounded soldier

    Cheers guys, I'll have a look. In the meantime, I'm trying to do something simple myself just for a game this week. I'm trying to mess around with the different health/damage settings to find the threshold for walking/crawling, but having written a simple script to increase a test soldiers health by 0.05 using setdamage in steps to see the effect, at 0.35 blood appears on right leg at 0.9 he dies but at all settings he is able to walk and run/sprint with no problems. Am I missing something? Martin
  7. bigduke6

    Carrying a wounded soldier

    Just had an idea, without animating it as such. Check if someones hit if their health is too low to walk, then repeatedly check the distance to the other players, so that if another player is standing next to them to 'help' them, temporarily put their health back up enough so they can walk, as long as the other player stays next to them, so imagine helping them walk rather than carrying them. When the other player moves too far away, put their health back down. Could even add an acton to the 'healthy' player of 'Help comrade', and while it's active have the wounded player not use movement controls, and use a script to setpos the wounded player to the side or back of the helper, then have an action for put comrade down to stop the setpos'ing and the other player can move as normal. Just an idea. Martin
  8. Guys, Done a search in ArmA and found nothing, searched OFP and found a couple of threads saying how good this would be but no actual mods or addons to do it. Has anyone done or is planning an animation/model for ArmA for allowing a soldier to pick up a wounded comrade, or even a dead one at that I guess - Don't leave anyone behind. I play coop missions with a buddy and it would be great if one had the chance to go back in and pick up the other if he's wounded and can't walk. I'm not interested in all these public competitive servers, just small scale Co-op missions, where as far as I'm concered this is a must-have feature. Thanks, Martin
  9. Yep, I get the problem as well. I have a 4 man squad patrolling around a town on WP's with a CYCLE WP and nearly always, but not always, the 3rd and/or 4th guy will stop. Thiking about it, it's always next to the cycle WP. Hmm, wonder if that's coincedence. Martin
  10. Figured out how to change positions instantly in an airborne helicopter. I eject the soldier, and then 0.1 seconds later move the soldier to the new position. Given the soldiers doorgunnerhook1 player1 travelling in helicopter hook1 So then the code is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">doorgunnerhook1 action ["eject", vehicle hook1] ~0.1 doorgunnerhook1 MoveInCargo hook1 player action ["eject", vehicle hook1] ~0.1 player1 MoveInGunner hook1 You need the time delay - without it the moves don't get actioned - I guess the computer is still ejecting you when the move is issued. It looks instant from a players point of view. I'll add this to the 'How to....' list Martin
  11. bigduke6

    arma artellery fire on map

    I'm trying to learn all this clever stuff myself. I've been searching and just found this. Check out this tutorial here http://www.ofpec.com/OFPReso....ick.htm from the ofpec tutorial page. Doesn't specifically deal with artillery fire, but tells you how to use the command to send where you clicked to be able to use it. Theres lots of useful tutorials there. http://www.ofpec.com/ed_depot/tutes.php Martin
  12. bigduke6

    arma artellery fire on map

    I'm trying to learn all this clever stuff myself. I've been searching and just found this. Check out this tutorial here http://www.ofpec.com/OFPReso....ick.htm from the ofpec tutorial page. Doesn't specifically deal with artillery fire, but tells you how to use the command to send where you clicked to be able to use it. Theres lots of useful tutorials there. http://www.ofpec.com/ed_depot/tutes.php Martin
  13. MH, Ooh yeah, they're shooting up my Loach good and proper now. The invisible targets solved all the AI firing/health problems as well. Nice. Thanks for your help. Martin
  14. MH, Thanks again. Got the pbo from your link and added it to the addons folder. However, still cant see an invisible unit type to select. Which category does it come under - men, objects, etc. Tried searching for the original les invisible target post to see if there was a readme but couldn't find anything, well actually found loads of posts with the word 'invisible' in but couldn't find a readme for that addon. No doubt it's right in front of my eyes.... Martin
  15. Just to prove that I do search for the answers before I post a question.... I want to have an intro mission where the player is transported to his new base on a helo (Chinook in this case from sebnam). There is a pilot, gunner, and several other cargo passengers. I create an empty helicopter, a seperate pilot and gunner and move them in (moveindriver, moveingunner). Player is moveincargo sitting in the back. To make the flight a bit more interesting, I want the helo to take some fire and then to (artificially) wound the gunner, and then have the pilot shout to the player 'Well you'd better get on that damn gun' or similar. So at the required point I add the action <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hook1 AddAction ["Man the doorgun", "Man_doorgun.sqs"] Problem is, I can't get the position moves to work while the helicopter is airborne. In fact, when I execute this script to do the switch, the (AI) pilot lands the helo, the gunner gets out, the gunner then runs around and climbs back in as cargo, but the player doesn't move. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> doorgunnerhook1 assignAsCargo hook1 ~1 Player1 assignAsGunner hook1 That's an improvement on this script, which did nothing <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> doorgunnerhook1 MoveInCargo hook1 ~1 Player1 MoveInGunner hook1 So, is there a way to change positions instantly in an airborne helicopter? Thanks in advance for any help. Martin
×