Jump to content
Sign in to follow this  
Blue1

Buildings / Bases undestroyable?

Recommended Posts

****solved*****

Hi Guys

Situation: 2 Headquarters with Spawns, a lot of Buildings (around Kamino Firing Range and Airbase)

"Funny People" that noticed they can't shoot or plant at the HQ, now just take the Helicopters or other Vehicles and are crashing into others, destroying the Buildings by crashing in, causing Explosions and make respawns impossible sometimes...

So, at first i want to make those buildings undestroyable. *done*

At second - if possible - i'd like to have an "Area" where also the Vehicles are not getting any damage until leaving this area? *done*

Many thanks and best regards,

Blue1

------- ---- this is how i've done it so far:

As sad as it is,... that someone has to put so much work and efforts to do something like that...You have to excuse my intention: I wanted to create the "Monkeyproof Base"

... as i like to keep my Server Public, and there will always be some ...lets say "funny People" ... messing around in the Base and ruining others Game anyhow.

Okay, what do we have?

We have 3 kinds of Triggers

1) Allow Damage Vehicle

2) Allow Damage Player

3) DO NOT ALLOW DAMAGE

We have also Markers which allow Objects, to define a Radius in Meters, where no Damage is possible to anything including Buildings, etc.

**** solved issues with that****

i tried with Triggers at every town where a respawn is possible, but people spwaning outside of the HQ still spawn in Godmode :(

But, if they respawn in the HQ, everything works.

as i didn't get this to work - i decided to delete the Triggers 3 which seems to solve the problem.

For the Price that spawning vehicles and stuff could be damaged ... we will see, maybe i do find another solution in the future.

---------deleted trigger-------------

Triggers (Number 3) = Vehicles in this Area, are set to take no Damage

(Markername: InvuON - GREY Marker, covering Spawn, Helis and Cars)

AXIS A: 60

AXIS B: 60

Name: InvuBluOffVehicles

Type: None

Activation: ANYBODY, Repeatedly, Present

Condition: true

*On ACTivation: null = thisList spawn {while{true} do {{_x allowDamage false}forEach _this; sleep 0.1}};

*Special thanks to Tuliq for that answer here

---------deleted trigger-------------

Triggers (Number 1) = If a Vehicle enters this Area, it can take Damage again

(Markername: InvuBluOffVehicles - Orange Markers)

AXIS A: 150

AXIS B: 20

Name: InvoBluOffVehicles

Type: None

Activation: ANYBODY, Repeatedly, Present

Condition: true

*On ACTivation: null = thisList spawn {while{true} do {{_x allowDamage true}forEach _this; sleep 0.1}};

Triggers (Number 2) = If a Player enters this Area, he can take Damage again

AXIS A: 150

AXIS B: 20

(Markername: InvuBluOFF - Red Markers)

Type: None

Activation: ANYBODY, Repeatedly, Present

Condition: this

On ACTivation: player allowDamage true

Place a Marker with Name: InvuBluHQ (Green Marker)

AXIS A: 35

AXIS B: 35

OBJECT: place a "Sphere 25cm" named it InvuBluHQ, so all Objects in Radius (35m) around the Marker InvuBluHQ can't be destroyed - add to

INITIALIZATION: objectsList = nearestObjects [getMarkerPos "InvuBluHQ", ["All"], 35]; {_x allowDamage false} forEach objectsList;

Same for the Buildings behind the base, to avoid destruction and causing damage to other Objects/Vehicles/Players...

Place a Marker with Name: InvuBluBuildings (Green Marker)

AXIS A: 45

AXIS B: 45

OBJECT: place a "Sphere 25cm" name it InvuBluBuildings, so all Objects in Radius (45m) around Markername InvulBluBuildings can't be destroyed - add to

INITIALIZATION: objectsList = nearestObjects [getMarkerPos "InvuBluHQ", ["All"], 45 {_x allowDamage false} forEach objectsList;

Additionaly i am using the GrenadeStop.sqf to prevent shooting / planting / throwing anything in a Radius of 100 Meters around a Marker in the HQ

Special Thanks to Bake & Rarek for that!

Setup:

/*

GrenadeStop v0.8 for ArmA 3 Alpha by Bake (tweaked slightly by Rarek)

DESCRIPTION:

Stops players from throwing grenades in safety zones.

INSTALLATION:

Move grenadeStop.sqf to your mission's folder. Then add the

following line to your init.sqf file (create one if necessary):

execVM "grenadeStop.sqf";

CONFIGURATION:

Edit the #defines below.

*/

#define SAFETY_ZONES [["TW_East_Respawn", 100], ["TW_West_Respawn", 100]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...]

#define MESSAGE "Placing / throwing items and firing at base is STRICTLY PROHIBITED!"

#define MORTAR_MESSAGE "No point you putting that up, soldier; we're fresh out of ammo for those things."

if (isDedicated) exitWith {};

waitUntil {!isNull player};

player addEventHandler ["Fired", {

if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then

{

deleteVehicle (_this select 6);

titleText [MESSAGE, "PLAIN", 3];

};

}];

player addEventHandler ["WeaponAssembled", {

deleteVehicle _this select 1;

titleText [MORTAR_MESSAGE, "PLAIN", 3];

}];

So, BLUFOR HQ looks like this:

(Of course i had to set this up for the OPFOR Base too, change Names of Markers etc.)

(the Red / Orange / Green coloured Markers are for testing and showing only, i removed the colors later)

BlUFOR BASE with Colored Markers to explain the Zones:

Markers1.JPG?raw=true

Same without the colored Markers but with the setup of the Triggers all around the HQ:

Triggers1.JPG?raw=true

Edited by Blue1
Solved / sharing

Share this post


Link to post
Share on other sites

_objectsList = nearestObjects [getMarkerPos "base", ["All"], 100];

{_x allowDamage false} forEach _objectsList;

This should make most objects within 100m of marker "base" invulnerable.

Now filter what can/cannot take damage.

Edited by JW Custom

Share this post


Link to post
Share on other sites

ha -great! thanks alot!

will try that out ASAP and report.

thanks again!

Share this post


Link to post
Share on other sites

Okay, so...

"hq_west" is a static / locked and already "allow damage false" Hunter in the base of this mulitplayer-map.

_objectsList = nearestObjects [getMarkerPos "hq_west", ["All"], 100];
{_x allowDamage false} forEach _objectsList;

just gives me "Local variables in Global space" so i removed the underscores

i took a "sphere 25cm" that is somewhat near to the Hunter and placed in the Initialization:

objectsList = nearestObjects [getMarkerPos "hq_west", ["All"], 100];
{_x allowDamage false} forEach objectsList;

shows no errors but isn't working ... if i take off with a MH-9 and crash down to something in that 100m radius / area

the MH-9 explodes and damages other stuff like buildings, people, vehicles... (which doesn't have "allow damage false" already, like the hunter or cashdesks and so on, of course)

what did i wrong?

thanks again mates!

Share this post


Link to post
Share on other sites
"hq_west" is a static / locked and already "allow damage false" Hunter in the base of this mulitplayer-map.

So "hq_west" is not a marker then? getMarkerPos "hq_west" ? getposatl hq_west !

Share this post


Link to post
Share on other sites

Thank you very much - works

I placed a additional marker instead referr to the Hunter.

Thanks a lot again.

*** -> edit: partwise :(

Edited by Blue1

Share this post


Link to post
Share on other sites

Works so far for the buildings,.... but it seems, there are 2 Problems left:

1 Players) after a map restart, some players "stay immortal" even after leaving the defined Radius. If they respawn, (with ESC -> Respawn) it is all okay.

So - how can i trigger it "if the radius is left -> allow damage true" for the playerunits?

2 Vehicles) the Vehicles at start of the map do the same as 1) and need also to be triggered at leaving the radius but, ....in my mission, if you leave a Helicopter for example, it disappears after 2minutes and respawns at HQ. After that it does take damage again (for example if some funny people crash in with a quad) even in the radius.

i think the script takes only effect on stuff at map start once. thats why a triggered solution would be nice.

I also have tried with that stuff

but did not work either

Can anyone help me with that please? (also Credited, of course!!)

I just want to get rid of people doing shit in the HQs.....

Thanks again!

B

Share this post


Link to post
Share on other sites

*bump* still help needed - see OP

Edited by Blue1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×