-
Content Count
201 -
Joined
-
Last visited
-
Medals
Posts posted by -ami- mofo
-
-
Hmmm can't get this to work.
Tested it just on the town of Sofia..
Trigger activated by blufor with...
Quote_null = [] execVM "destruction.sqf";
A marker in the middle of Sofia called
QuoteDESTROYALL_SOFIA
then this in a 'destruction.sqf' file in the mission folder..
QuoteB_types = [
"Land_Chapel_V1_F",
"Land_Chapel_V2_F",
"Land_i_House_Big_01_V1_F",
"Land_i_House_Big_01_V2_F",
"Land_i_House_Big_01_V3_F",
"Land_i_House_Big_02_V1_F",
"Land_i_House_Big_02_V2_F",
"Land_i_House_Big_02_V3_F",
"Land_i_Shop_01_V1_F",
"Land_i_Shop_01_V2_F",
"Land_i_Shop_01_V3_F",
"Land_i_Shop_02_V1_F",
"Land_i_Shop_02_V2_F",
"Land_i_Shop_02_V3_F",
"Land_i_House_Small_01_V1_F",
"Land_i_House_Small_01_V2_F",
"Land_i_House_Small_01_V3_F",
"Land_i_House_Small_02_V1_F",
"Land_i_House_Small_02_V2_F",
"Land_i_House_Small_02_V3_F"
];fn_destroyall_sofia = {
[] spawn{systemChat "Starting to destroy Sofia..";
for [{_i=0},{_i < (count B_types)},{_i=_i+1}] do {
_building = getMarkerPos "DESTROYALL_SOFIA" nearObjects [B_types select _i, 300];
sleep 7;
{_x setDamage 1} forEach _building;
};
systemChat "Sofia - Ready";Nothing happens at all.
Any ideas what I've done incorrectly?
-
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 :-)
- 1
-
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 :-)
-
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...
Quotegrp = [getmarkerpos "M10", independent, 6] call bis_fnc_spawngroup;
[grp, getmarkerpos "M10", 150] call BIS_fnc_taskPatrol;
grp setbehaviour "combat";
{
_x removeAllEventHandlers "HandleDamage";
_x addEventHandler ["HandleDamage",{
_damage = (_this select 2)*1.5;
_damage
}];
}forEach units grp;Then the 2nd trigger with 1150m radius with this...
Quotegrp = [getmarkerpos "M11", independent, 6] call bis_fnc_spawngroup;
[grp, getmarkerpos "M11", 150] call BIS_fnc_taskPatrol;
grp setbehaviour "combat";
{
_x removeAllEventHandlers "HandleDamage";
_x addEventHandler ["HandleDamage",{
_damage = (_this select 2)*1.5;
_damage
}];
}forEach units grp;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.
-
Thanks noris it worked perfectly.
- 1
-
Hi guys,
I already have this in my init.sqf which works fine on the damage handling of editor placed units.
Quoteif ( side _x == INDEPENDENT ) then {
_x removeAllEventHandlers "HandleDamage";
_x addEventHandler ["HandleDamage",{
_damage = (_this select 2)*1.5;
_damage
}];
};
}forEach allUnits;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...
Quotegrp = [getmarkerpos "M1", independent, 6] call bis_fnc_spawngroup; grp
Hoping it's an easy fix.
Thanks.
-
Got it working...
grp = [getMarkerPos "M1", independent, 6] call bis_fnc_spawngroup; grp setFormDir 220;
-
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.
-
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
-
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.
-
Thanks mate, works a treat as usual :-)
Have a great xmas.
-
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.
-
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
Quotearty1 doArtilleryFire [getmarkerpos "arty_target1", "32Rnd_155mm_Mo_shells", 10];
arty1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];
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.
-
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.
Quoteparams[ "_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"];
if ( lifeState _unit != "INCAPACITATED" ) then {
//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 / 5;
_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;
};
}else{
_damage = 0;
};
_damage
}];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.
-
Mate you're an absolute legend.
Back in business, I can't thank you enough! :D
-
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.
-
Thanks mate.. working perfectly :)
-
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?
-
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.
-
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. -
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.
- 1
-
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.
-
Thanks mate.. so much to this editing/scripting eh.
-
Just read that player handle damage in arma 3 isn't working but nobody knows why. It worked in Arma 2. So until BIS fix it (if they fix it) then I guess I'd better always wear a special carrier rig lol.
Destroy almost all buildings on the map?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Thanks a lot h.. works like a charm now :-)