Jump to content

-ami- mofo

  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by -ami- mofo

  1. Hi guys I have this script that I put in a units init.. this addeventhandler ["HandleDamage", { _unit = _this select 0; _selection = _this select 1; _passedDamage = _this select 2; _source = _this select 3; _projectile = _this select 4; _oldDamage = 0; _damageMultiplier = 0.5; switch(_selection)do{ case("head") :{_oldDamage = _unit getHitPointDamage "HitHead";}; case("body") :{_oldDamage = _unit getHitPointDamage "HitBody";}; case("hands") :{_oldDamage = _unit getHitPointDamage "HitHands";}; case("legs") :{_oldDamage = _unit getHitPointDamage "HitLegs";}; case("") :{_oldDamage = damage _unit;}; default{}; }; _return = _oldDamage + ((_passedDamage - _oldDamage) *_damageMultiplier); _return }]; And it works a treat on AI but it doesn't work for players. Is there a tweak to get it so it works on players? (MP co-op hosted on my machine). Thanks.
  2. Hi guys I'm wanting to spawn a few AI groups every so often at regular intervals (say every 30 seconds) on different markers as players descend onto a town. I've got it working fine by using half a dozen triggers all with their centers at the same point but each one with a smaller radius than the last. But I'd really like to make it all happen with just one trigger. Quick example of what I have now:- The 1st trigger with 1200m radius with this... Then the 2nd trigger with 1150m radius with this... And so on for a total of 6 different triggers, 6 different markers and 6 different timed spawns. So is it possible to put all this scripting into just 1 trigger and have each lot fire at 30 second intervals? Thanks.
  3. Hi guys I had two scripts working fine in MP before the update and now neither works. One in the init.sqf file which kept the player in revive mode and not able to be killed until the revive timer ran out... // Stay in revive until bleed out if (hasInterface) then { player addEventHandler ["Dammaged", { params ["_unit"]; if (lifeState _unit == "INCAPACITATED") then { _unit allowDamage false; null = [_unit] spawn { params ["_guy"]; waitUntil {sleep 1; lifeState _guy != "INCAPACITATED" || isNull _guy || !alive _guy}; if (!isNull _guy && alive _guy) then { _guy allowDamage true; }; }; }; }]; }; And I had an initplayerlocal.sqf that reduced the player damage a bit... params[ "_unit" ]; //Exit if we are a player and not local //Otherwise add EH for AI every where just incase their locality //changes due to moving into a players group //the EH will only fire where the AI is local if ( isPlayer _unit && { !local _unit } ) exitWith {}; if ( isPlayer _unit ) then { //Waituntil REVIVE handleDamage EH has been applied waitUntil{ !isNil { _unit getVariable "bis_revive_ehDamage" } }; //Remove REVIVE HandleDamage EH _unit removeEventHandler[ "HandleDamage", _unit getVariable "bis_revive_ehDamage" ]; }; //Only damage from last applied handleDamage EH is taken into consideration by the engine //Apply a new EH so as we can override the damage applied _unit addEventHandler [ "HandleDamage", { params ["_unit", "_selection", "_damage","_source","","_index"]; //Do any other damage calculations here //_damage is the total damage the unit has for this selection once this EH returns //e.g lets change the damage recieved for each selection if ( _index > -1 ) then { private _selectionDamage = _unit getHit _selection; private _damageRecieved = (_damage - _selectionDamage) max 0; _damageRecieved = _damageRecieved / 4; _damage = _damageRecieved + _selectionDamage; }; //Only players respond to REVIVE if ( isPlayer _unit ) then { _this set[ 2, _damage ]; //Call BI REVIVE HandleDamage EH passing new _damage value _damage = _this call BIS_fnc_reviveOnPlayerHandleDamage; }; _damage }]; I thought I'd better give them a MP test since the new update because.. ya know. And unfortunately both aren't working. The update log mentioned a couple of things regarding the game's damage / revive... Tweaked: The damage model for the 'Basic' Revive setting was changed Fixed: The "onPlayerKilled.sqf" and the "Killed" Event Handlers were not fired when players would bleed out in Revive Tweaked: The damage model for the 'Basic' Revive setting was changed Not being a scripter or game tech savvy I'm not sure whether these have something to do with it or whether all that's needed is a tweak to the scripts to get them working again? Any help would be terrific though. Thanks.
  4. Thanks a lot h.. works like a charm now :-)
  5. Hmmm can't get this to work. Tested it just on the town of Sofia.. Trigger activated by blufor with... A marker in the middle of Sofia called then this in a 'destruction.sqf' file in the mission folder.. Nothing happens at all. Any ideas what I've done incorrectly?
  6. Thanks Grumpy that script works a treat. I've altered some of the numbers to lessen the amount of AI a bit and it's crankin :-)
  7. Hi mate Thanks for that, is there a way to get them to spawn on different markers though as they all spawn on the same one? EDIT- actually don't worry mate, they all head out patrolling in different directions so all good. Thanks :-)
  8. Thanks noris it worked perfectly.
  9. Hi guys, I already have this in my init.sqf which works fine on the damage handling of editor placed units. What I'd like to do though is have any spawned units spawn with the same damage handling. Currently any units spawned have the default damage. I'm spawning units via the BIS fnc... Hoping it's an easy fix. Thanks.
  10. Hi guys I have a marker called M1 and a trigger with this... grp = [getMarkerPos "M1", independent, 6] call bis_fnc_spawngroup; I want the group to spawn and take their formation all facing in a certain direction though and as yet I've failed. Tried something from the wiki which didn't work but I'm a scripting nub anyway. Is there a little bit of extra code I can add to that to achieve what I want? Thanks
  11. Got it working... grp = [getMarkerPos "M1", independent, 6] call bis_fnc_spawngroup; grp setFormDir 220;
  12. Hey guys I don't really get that optional azimuth/direction, makes no sense to me and I tried the other example but doesn't matter what number of degrees I put in they just spawn and face the same way everytime.
  13. -ami- mofo

    Titan Compact: Can't lock on targets since latest update

    Anymore news on this? I've been away for over a month and it was working normally before I left. Of note is that not only doesn't the AT lock on anymore but when you fire a missile there's not even a hint of any recoil at all.
  14. Hi guys I've just started messing with the Eden editor and want to enable BIS revive for a MP co-op mission. I've placed down 5 playable units but the problem is that the 'revive enabled' check box on each unit's attributes is greyed out so I can't select it. Do you need to do something else 1st in order to have this checkbox option available? Thanks. EDIT- worked that out. I had to have the multiplayer attribuites revive set to player attributes. A new question though.. the number of times I'm able to revive seems to differ. Sometimes a player will get shot several times and can be revived each time. Other times he just gets killed straight away. Is the revive kind of buggy?
  15. -ami- mofo

    Artillery script half works

    Thanks mate, works a treat as usual :-) Have a great xmas.
  16. Hi guys, I have a scorcher called arty1 and an invisible marker called arty_target1 Then I have a trigger with activation as "radio alpha" and in the on act I have This is a co-op MP mission and works as it should for the mission host.. but for any other player the radio alpha only results in the scorchers gun barrel pointing skywards (and kind of wiggling a bit)... but nothing comes out?! Does anyone know why this happens and what I need to change so that the scorcher actually fires for the non host players? Thanks.
  17. Hey daza I'm fine now thanks mate, I use Arma's revive together with a bit of scripting that keeps us in revive mode for 5mins. Plenty of time to get revived and if not it's dead/mission failed.
  18. Yep Larrow's the man... he sorted me out. Make an InitPlayerLocal.sqf file with Larrow's scripting and slip it into your missions folder and then you can stay in revive mode until the timer runs out without taking anymore damage and dying. I use the script below (also from Larrow) as it does ^^that but also enables me to alter the damage we take as we often play in a small co-op group against quite a few AI. So we need to be less prone to damage than usual. Couple of other things... I think you have to disable respawn in the editors multiplayer attributes as I've heard revive and respawn don't work well together. I don't use respawn though anyway so can't confirm whether true or not. Also in editor MP attributes have the revive mode 'controlled by player attributes'. Incapacitation mode 'basic'. Set the revive timer to how long you want players to stay in revive until they bleed out and die. Then right click on your playable units and choose 'attributes', 'object special states' and check the 'revive enable' box. Now you should be good to go.
  19. Mate you're an absolute legend. Back in business, I can't thank you enough! :D
  20. -ami- mofo

    Reducing player damage

    Thanks mate.. working perfectly :)
  21. -ami- mofo

    Reducing player damage

    Thank you Larrow and Bad Benson :) That did indeed work. Tested in MP with Arma's revive plus a little script I have that keeps players in revive mode until time out. Worked perfect! The only question I have left is that when somebody takes any kind of damage even if small damage (ie- jumps off a wall) it lists all the damage info on the screen (bottom left). Is there a way to remove that?
  22. -ami- mofo

    Reducing player damage

    Hi mate I'm a newb when it comes to scripting, I don't even understand all that.. I went to paste that (minus all the stuff after the //) in the units init (that's what you meant by initplayer local?) and got a type bool expected nothing error. You may have to guide me a little more on getting this to work.
  23. -ami- mofo

    Helicopter Extraction

    Hi mate I just finished this. Call up heli pick up via radio Alpha, picks you up at LZ pick up location and drops you off at LZ drop off location. Won't take off and leave until all your group is fully in out and of the heli. Plus will still do it under enemy fire. Good to keep as a template for when you need it then just copy/paste. http://www.freespace.com.au/filehosting/11275
  24. -ami- mofo

    Reducing player damage

    After a little more testing it seems that the culprit is Arma's own revive system. Seems like it and damage handler won't work together. Turn arma's revive off and that script does work in MP. But we use revive so unfortunately no reducing player damage for us. May just have to make the enemy a little less accurate lol.
  25. -ami- mofo

    Reducing player damage

    Not an official source, just read in several places where ppl are trying to find other ways of achieving it as they say that it's not working like it used to. Google arma 3 player reduce damage and you'll find a few bits and pieces.