Jump to content

-ami- mofo

Member
  • Content Count

    201
  • Joined

  • Last visited

  • Medals

Posts 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 used Beerkan's method,

     

    Basically have this in a trigger (by blufor)...

    cargo = "B_supplyCrate_F" createVehicle getpos thistrigger;
    cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 250];[objnull, cargo] call BIS_fnc_curatorobjectedited;
    
    clearMagazineCargoGlobal cargo;
    clearWeaponCargoGlobal cargo;
    clearItemCargoGlobal cargo;
    clearBackpackCargoGlobal cargo;
    
    cargo addMagazineCargoGlobal ["SatchelCharge_Remote_Mag",6]; 
    cargo addBackpackCargoGlobal ["B_Carryall_mcamo",2];
    cargo addWeaponCargoGlobal ["srifle_DMR_03_F",2];
    cargo addMagazineCargoGlobal ["20Rnd_762x51_Mag",24];
    cargo addItemCargoGlobal ["muzzle_snds_B",2];
    cargo addItemCargoGlobal ["optic_Hamr",2];
    cargo addMagazineCargoGlobal ["HandGrenade",12];
    cargo addItemCargoGlobal ["Binocular",2];
    

    Works great and in MP too, only problem is that in MP it duplicates iteslf.  Basically if two of us are doing a MP co-op mission we get two crates parachuting in not one.

    Does anybody know why this is happening and more importantly, how to stop it so we just have the 1 crate?

    Thanks


  3. Hi guys,

     

    I want to do a mission where an AI huron (that I've call huron) flies at a reasonable height to a waypoint and then we jump out. Pretty easy eh? Yep not with BIS dumb AI.

     

    If I put in any flyinHeight number ie huron flyinHeight 500; then the AI huron can't even track to one simple waypoint without going way off course or circling about. It'll only manage it at it's own default fly height which is too low.

     

    I've tried setting pilot skill to 100, behaviour to safe even though there's nothing firing at it and increasing the placement radius of the waypoint to 500. But no change if I use flyinHeight.

     

    Is there a way to do what I'm trying to achieve?

     

    Thanks


  4. Hi Wyatt I'm having some trouble getting it to work.

     

    I'm running a MP mission from my own PC and did what you said re changing the (isserver) to (true) on both the line that goes in my init file and line 7 of the actual script so now I have these..

     

     

     

    if (true) then {execVM "jumpscript.sqf"};

     

    and

     

     

    if (true) exitwith {diag_log "Jumpover script has been ran on server.  This is a client only script."};

     

    The only other thing is that I use right SHIFT as my usual step over key but you said that shouldn't be a problem.

     

    Have I missed a step?


  5. Hi,

     

    I'm trying to get an AI unit to enter an AI helicopter once it lands but the heli refuses to land once I've sync'd the waypoints.

     

    I have an AI heli called 'heli',  an invisible heli pad with a LOAD waypoint on it with this in the on act: 

    heli land "get in"; 

    Then I have an AI unit with a GET IN waypoint that I've sync'd to the heli's LOAD waypoint. 

     

    Without the waypoints sync'd the heli touches down and lands on the helipad like it should but when the GET IN and LOAD waypoints are sync'd together the heli flys in but hovers in the sky above the helipad, it won't land.

     

    I have to have them sync'd together to get the unit to enter the heli but how do I get the heli to still land like before?

     

    Thanks


  6. Everythings working fine guys. Really stupid mistake I was saving as MP rather than exporting to MP. That's why none of the .sqf stuff was working  :rolleyes:  :rolleyes:

     

    Marquez I've used some of your script for weapon sway / recoil (with a slight tweak) & stamina off / walk off. But not the revive bit as adjusting the revive bleed out delay still doesn't stop players from being killed.

     

    For that I've used David's script to keep players in revive mode and not dying until their bleed out time runs out in which case they're out anyway. Didn't want to use any respawn. So I've got exactly what I want now, thanks guys :) .

     

    init.sqf now looks like this and works perfectly in multiplayer...

    enableRadio false;
    enableSentences false;
    setViewDistance 3000;
    
    
    //player stamina and sway disable script
    player enableFatigue false;
    player enableStamina false;
    player forceWalk false;
    player allowSprint true;
    
    //Turn off stupid stamina
    if (hasinterface) then {
    	waitUntil {!isnull player};
    	player enableStamina false;
    	player addEventHandler ["Respawn", {player enableStamina false}];
    };
    
    //Turn off stupid forcewalk
    if (hasinterface) then {
    	waitUntil {!isnull player};
    	player forceWalk false;
    	player addEventHandler ["Respawn", {player forceWalk false}];
    };
    
    // Custom Weapon Sway & Recoil
    player setCustomAimCoef 0.1;
    player setUnitRecoilCoefficient 0.3;
    
     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;
    			};
                    };
     
                };
     
    	}];
    };
    

  7. Thanks Maquez, I downloaded it but it wouldn't extract without errors and I ended up with nothing in all the files. Have you got anywhere else I can download it from please?

     

    Also even if this works I still have the problem of my mission init.sqf file only working in single player.

    Can someone please do me a small favour.. below is a link to a mission I made about a year back which worked perfectly in co op multiplayer. But now the init.sqf file isn't working and in fact none of the triggered .sqf files seem to be working either.

    This is driving me crazy as I don't know why nothing .sqf will work in MP.

    Can someone please d/l it, stick it in ur missions file, open it in ur editor, save it to MP missions and then try it? If it's working you should get some text come up on ur screen within a few seconds of the mission start. 

    If it works for you then it may suggest I need to reinstall arma. If it doesn't work for you then I have no idea lol.

    http://www.freespace.com.au/filehosting/620008


  8. Thanks David.

     

    I still can't even try this because my init.sqf file won't work on multiplayer (only singleplayer). But I had several other missions that worked a few months ago that won't work now either. I haven't changed a thing on them, they've just stopped working. Besides reinstalling arma I don't know what else to do. BIS haven't changed the way init.sqf files work have they?


  9. Thanks David,

     

    I've not had a chance to see whether this works or not because for some reason nothing at all in my mission init.sqf seems to be working. Odd because the same init.sqf (minus your script) worked a few months ago when I last hosted a coop game on my machine for me and a few friends.

    Does it look ok?

     

    if (!isServer && (player != player)) then
    {
     waitUntil {player == player};
     waitUntil {time > 10};
     };
     
     
     
    {
        _x addEventHandler ["Dammaged", {
        
            params ["_unit", objNull, [objNull]];
     
            
                if (lifeState _unit == "INCAPACITATED") then {
                    
                    _unit allowDamage false;
                    
                    null = [_unit] spawn {
                    
                        params ["_guy"];
                        waitUntil {sleep 5; lifeState _guy != "INCAPACITATED"};
                        _guy allowDamage true;
                    
                    };
     
                };
     
        }];
    } forEach (if (isMultiplayer) then {playableUnits} else {switchableUnits});
     
     
     
     
    enableRadio false;
    enableSentences false;
     
     
     
    setViewDistance 2000;
     
     

     


  10. Hi guys I'll just point out that know basically nothing about scripting so I'm just trying to piece this together from bits n pieces and I don't even know if it's possible.

     

    I'm using the apex BIS revive in the editor for a MultiPlayer co-op mission and would like it if once players went into revive mode that they'd stay there ie- can't be killed (setting menu options to basic doesn't prevent death).

     

    I'm trying to use an event handler, so far I have this in my mission init.sqf file..

    {
    _x addEventHandler ["HandleDamage", {null = [] execVM "revive.sqf";}]
    }foreach allunits;
    
    

    which I think is correct.

     

     

    Then I have a script file called revive.sqf with this...

    if (lifeState (_this select 0) == "INCAPACITATED") then {
    		0
    	};
    }];
    

    Which I think may be the problem why it doesn't work but not being a scripter I don't know what I need to change to (hopefully) get it to work.

     

     

    If anyone can do some adjusting or whatever to get it functioning I'd be really greatful.

     

    Thanks


  11. Put this in your init.sqf:

    if (hasInterface) then {
        [] spawn {
            waitUntil {alive player};
            player setVariable ["loadout",getUnitLoadout player,false];
            player addEventHandler ["Respawn", {
                player setUnitLoadout (player getVariable "loadout");
            }];
        };
    };
    

    That should keep reseting the player to his initial loadout whenever he respawns.

     

     

    Hi Tajin,

     

    Did that and it didn't work. Player still respawns with default BIS loadout. Is that script multiplayer compatible?


  12. Thanks guys. I set it to basic to begin with so that's the setting I've been using to no avail.

    Tajin I tried your event handler below (all I did was copy and paste it into the init boxes of the playable units... that was the correct way to do it?) and it didn't make any difference. More than medium damage is instant killed or some more damage if you're lying there in revive mode and you also get killed.

     

    Dunno what else to do really. I'm amazed BIS haven't got something that will just put you and keep you in revive mode until your alloted time runs out.

     

    Can what you've done below be modified with something like this to give the desired effect?...

     

    if (alive _unit && _amountOfDamage >= 1 && _isUnconscious == 0) then 
    {
    _unit setDamage 0;
    _unit allowDamage false;
    _amountOfDamage = 0;

     

    I don't know scripting so I'm basically grasping at straws here lol.

     

     

     

    So if thats not enough, you could still fix it by using a handleDamage Eventhandler. Something like this should suffice:

    player addEventHandler ["HandleDamage",{
    	if (lifeState (_this select 0) == "INCAPACITATED") then {
    		0
    	};
    }];
    

     

     

     


  13. I've got it set to basic.

     

    What I've discovered is that if the player just gets shot a bit then he goes into incapacitated mode and is able to be revived. But if the player receives quite a bit of damage, say being sprayed a bit with an LMG then he's killed.

     

    I thought that having revive enabled would mean that the player will only be killed if the revive countdown timer runs out. But it appears not, seems like receiving over a medium amount of damage and you're dead.

     

    That sound right?


  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. Hi,

     

    I'm brand new to the eden mission editor and am making a co-op mission. When I click on ATTRIBUTES from the top menu and choose MULTIPLAYER I can't then choose any of the options in the drop down boxes of GAME TYPE and REVIVE.

     

    The drop down lists appear but it's like all the choices are locked.

     

    Any idea why this may be?

     

    Thanks

     

    EDIT - It seems that none of the drop down boxes are selectable from any of the top menus stuff. Has the new update today broken them?

×