Jump to content
oberKGBler

Make object only destroyable by specific weapon & other noob questions

Recommended Posts

Hy all,

Im new to mission building and have a few question, I hope you guys will help me.

Problem1: SOLVED
I have placed a radardome that should be taken down by players.
How can I make it only destroyable by Explosiv Satchel or Explosiv Charge? Alternative, can I make it immune to damage from missiles?

Problem2: SOLVED
I set a task to the destroy the radardome that works like intented. On it destruction another task triggers to reach a exfill point. All done with Eden modules and triggers.
It seems that my trigger do not trigger if players, or simply BLUEFOR are present at the exfill position. Any idea what I did wrong?

Problem3: SOLVED
I tried implement a respawn with the gear on the point of death regarding this tutorial White Raven Respawn tut .
Without the on player spawn script the player will restart naked. With the respawn script the player will spawn with the native gear, not the custom loadout.

Problem4: SOLVED
I run pierremgi´s script to change to civilian without gun pierremgi´s unarmed change to civilian script.
It seems I set it up the wrong way in the initPlayerLocal.sqf since it works fine if I execute it by hand while in the game, but it wont run by defaul.

 

EDIT:

 

Problem5:

How can I let a trigger run only if all players are in the zone and alive.


Your help is greatly appreciated!

Share this post


Link to post
Share on other sites

For problem 1 check

There is a small typo in the script, it should be if (_projectile isKindOf "DemoCharge_Remote_Ammo" or _projectile isKindOf "SatchelCharge_Remote_Ammo")

 

Problem 2 - need more information. What doesn't trigger? The task doesn't appear? The trigger doesn't run when players reach the exfill point? What exactly are you trying to do, and have already tried?

Problem 4 - I am not 100% sure, but I think initPlayerLocal.sqf is only used for multiplayer?

  • Like 1

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf is fine SP/MP
test with:

[] spawn {
  while {true} do {
    waitUntil {sleep 2; primaryWeapon player + secondaryWeapon player + handgunWeapon player isEqualTo ""};
    player setCaptive TRUE;
    player setVariable ["EHCaptive",player addEventHandler ["GetOutMan", {
      params ["_plyr", "_role", "_veh"];
      if (_role == "driver") then {
        unassignVehicle _plyr;
      };
    }]];
    waitUntil {sleep 2; !(primaryWeapon player + secondaryWeapon player + handgunWeapon player isEqualTo "")};
    player setCaptive FALSE;
    player removeEventHandler ["GetOutMan",player getVariable ["EHCaptive",999]];
  };
};

 

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, oberKGBler said:

Problem3:
I tried implement a respawn with the gear on the point of death regarding this tutorial White Raven Respawn tut .
Without the on player spawn script the player will restart naked. With the respawn script the player will spawn with the native gear, not the custom loadout.

 

Which mod / script make your respawning player naked? It's not vanilla except you start naked in your scenario. Try to understand where does it come from, then it's easy to correct that.

Share this post


Link to post
Share on other sites

Hi again,

first of all, thank you guys so much for your help!
I found out that I fell for a windows trap with the hidden txt endings. So Problem 3 & 4 are solved now with correct endings.
Also I think my trigger did not work because I had all triggers from all exfill positions synced to the same tasksetstate module. So Problem 2 is also solved.

Also as add. info, my mission will be used in MP.
 

9 hours ago, domcho said:

For problem 1 check

There is a small typo in the script, it should be if (_projectile isKindOf "DemoCharge_Remote_Ammo" or _projectile isKindOf "SatchelCharge_Remote_Ammo")

 

Problem 2 - need more information. What doesn't trigger? The task doesn't appear? The trigger doesn't run when players reach the exfill point? What exactly are you trying to do, and have already tried?

Problem 4 - I am not 100% sure, but I think initPlayerLocal.sqf is only used for multiplayer?


Thank you for that link, I will try it!
 

4 hours ago, pierremgi said:

 

Which mod / script make your respawning player naked? It's not vanilla except you start naked in your scenario. Try to understand where does it come from, then it's easy to correct that.

 

that script https://www.dropbox.com/s/jsv4zcs624606pg/Respawn_with_custom_loadout_files.zip?dl=0 with naked I meant without gear.
I just saw that I provided the wrong link, I corrected that. But as stated above, everything works fine now.


I have a new Problem 5:

While searching a solution for my trigger problem I found that 

 and implemented it. We tried my mission yesterday, shortly before reaching exfill a buddy TK´d us and was still able to trigger the exfill trigger while we where on the spawn menu.
I hosted the mission. Any Idea?

Thanks again for your help. Especially pierremgi, you are a life safer and great mentor.

Share this post


Link to post
Share on other sites

I think that's to be expected. The trigger condition checks for living players inside the trigger area. Since there was only 1 player alive and everybody else was dead, the trigger condition was fulfilled once he entered it.

Share this post


Link to post
Share on other sites

Oh I thought it compares the amount of players with the amount of alive players in the area.

 

How could I achieve that the trigger only runs when the amount of alive players equals the total amount of players in the mission?

Share this post


Link to post
Share on other sites

My scripting skills for multiplayer aren't the best, but I assume something like:

{_x inArea thisTrigger} count (allPlayers - entities "HeadlessClient_F") == count (allPlayers - entities "HeadlessClient_F")

 

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

×