Jump to content

Recommended Posts

JBOY Mace Trap for Prairie Fire is released!

The jungles of Nam just got a little more dangerous!   This is not MP tested yet, but hopefully will work.  Please report any bugs found in this thread.

 

Fun release vid:

Editor demonstration showing how to set up mace traps:

Original pre-release teaser video:

 

Get sample mission here:

https://www.dropbox.com/s/erki8qb50f9his9/JBOY_MacePunjiTrapDemo.vn_khe_sanh.7z?dl=0

 

Credits: 

  • Savage Game Design for objects and voice files used in the script.
  • Bohemia Interactive for voice files and sound fx.

 

How to add Mace Traps to mission in the Editor:

  1. Copy the JBOY folder from sample mission into your mission folder.
  2. Include these two lines (copy from sample mission init.sqf) into you init.sqf file.
    1. // **********************************************************************
      // Compile JBOY functions
      // **********************************************************************
      _n = execVM  "JBOY\JBOY_compileFuncs.sqf"; // Compile general JBOY functions
      call compile preprocessFile "JBOY\mace\compileMaceScripts.sqf"; // Compile all Mace functions

       

  3. Place a Whip Trap object in the editor.  The direction you set the trap will be the direction the mace will swing.
    Note that AI may be inclined to walk around the trap, so you might want to place more objects on map to funnel the AI path into the trap.
  4. In the Whip Trap object's init field, put the following code:

 

[this,'WEST'] spawn {sleep 3; _this spawn JBOY_maceTrapCreate;};

The second parameter above determines who can activate the trap.  
This script creates a trigger for the trap, so these are the values you canuse for this parameter:

 

  • "EAST", "WEST", "GUER", "CIV", "LOGIC", "ANY", "ANYPLAYER"

 

For a Prairie Fire mission you might want to set it to WEST so only West units activate the trap.  This simulates the locals (VC and Civs) knowing to avoid the trap.
 

 

  • Like 11
  • Thanks 2

Share this post


Link to post
Share on other sites

Cool stuff!  Always something useful & creative releasing from you good man.

 

This one is particularly unique & visceral.  Will give unsuspecting players a good shock (regardless of whether it hits them or their AI buddy, or simply whooshes by). 😉

  • Thanks 1

Share this post


Link to post
Share on other sites

Awesome mod! Thank you for spending the time to make it and let the community use it. I tested it in MP and it works just as your videos show, but when I tested it on a dedicated server it got all wonky.

On dedicated (Pic 1), the trap looks like the sun, and there's two of them, plus the swinging rope appears to be off in the wrong direction. (Pic2)

 

Pic 1 Link

 

Pic 2 Link

Share this post


Link to post
Share on other sites
11 hours ago, kMaN175 said:

Awesome mod! Thank you for spending the time to make it and let the community use it. I tested it in MP and it works just as your videos show, but when I tested it on a dedicated server it got all wonky.

On dedicated (Pic 1), the trap looks like the sun, and there's two of them, plus the swinging rope appears to be off in the wrong direction. (Pic2)

 

Pic 1 Link

 

Pic 2 Link

Thanks much for the feedback and bug report.  Sadly I'm not sure how to fix it for dedicated server.  If you have any ideas I'd love to hear them! 

Share this post


Link to post
Share on other sites
On 4/11/2022 at 7:25 PM, kMaN175 said:

Awesome mod! Thank you for spending the time to make it and let the community use it. I tested it in MP and it works just as your videos show, but when I tested it on a dedicated server it got all wonky.

On dedicated (Pic 1), the trap looks like the sun, and there's two of them, plus the swinging rope appears to be off in the wrong direction. (Pic2)

 

Pic 1 Link

 

Pic 2 Link

 

Go inside the JBOY folder and then mace folder, inside look for the maceTrapCreate.sqf file. Inside you have to modify 2 lines, 26 and 38, both of them have "setObjectTexture" on them, you just have to append "Global" to those lines, so it will look like "setObjectTextureGlobal".

 

Im going to copy paste both those lines just in case I didn't explain my self properly. They have to look like this when modified:

 

26 -> _topOfRope setObjectTextureGlobal [0,'vn\characters_f_vietnam\opfor\uniforms\data\vn_o_nva_army_bdu_shirt_03_co.paa']; 

38-> _maceSphere setObjectTextureGlobal [0,'vn\characters_f_vietnam\opfor\uniforms\data\vn_o_nva_army_bdu_shirt_03_co.paa']; 

 

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, DonSucio said:

Go inside the JBOY folder and then mace folder, inside look for the maceTrapCreate.sqf file. Inside you have to modify 2 lines, 26 and 38, both of them have "setObjectTexture" on them, you just have to append "Global" to those lines, so it will look like "setObjectTextureGlobal".

 

You are a rockstar DonSucio!   Thank you.  So with these changes, you have this working in MP and dedicated server?

Share this post


Link to post
Share on other sites
6 hours ago, johnnyboy said:

You are a rockstar DonSucio!   Thank you.  So with these changes, you have this working in MP and dedicated server?

Yes sir, I'm not sure if I can but I'll link a video to a mission I just finished with my unit using it in a MP Dedicated Server 🙂

 

Video:  (it's supossed to start at the exact time they are used, but just in case minute 56:22)

 

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
31 minutes ago, DonSucio said:

Video:  (it's supossed to start at the exact time they are used, but just in case minute 56:22)

That's awesome man!  The victim was supposed to drop his weapon though!  Did you remove that part, or does the weapon dropping not work in multi-player?

Share this post


Link to post
Share on other sites
6 hours ago, johnnyboy said:

That's awesome man!  The victim was supposed to drop his weapon though!  Did you remove that part, or does the weapon dropping not work in multi-player?

Didn't know about that, I suppose it didn't work. The only thing I modified is the one I mentioned, did not modify anything else. 

Share this post


Link to post
Share on other sites

Hello, really nice code ! 

Is there a way to make the rope less flexible ? Else it always hits to ground first and this slows the mace quit a lot 😞 .

--
Found in maceTrapCreate.sqf

_mace setMass 170; // realtively low mass so initial swing doesn't hit the ground, then set higher so hangs lower (in controlMaceSwing function)

I will try different values to see if it helps.
--
does not seem to impact 😕 need help 

Share this post


Link to post
Share on other sites
10 hours ago, MeatAlive said:

does not seem to impact 😕 need help 

It should be created in a flat space for one.  If that's not the problem, maybe make the rope a little shorter.  I do remember having to adjust mass to get it right.  Sorry, its been a long time since I've looked at this code or thought about this at all.

Share this post


Link to post
Share on other sites

I tested various type of terrain (angled, flat, etc.) and more ore less same issue every time. I tried to adjust the rope length but since I started to learn arma3 script recently it is not always easy 😛 . 
I will try to tweak some more parameters (the mass does not seem to affect the first fall that much AND shorter rope has kind of the same issue) and if if find a better sets of param for me I will post it here 🙂 .
I think the issue is in the code that increases the mass of the mace when it falls, I think when it gets near of the trap the weight is too much.
 
PS: Thx again for your scripts ! they are so cool ! I wish I had the skills to code that sort of stuff 

Share this post


Link to post
Share on other sites

Done some more testing and I finally found the root cause of my issue (why the player was almost never killed and attached to the mace). It is linked to the ace medical property "Player Critical Damage Threshold". It seems like your scrip @johnnyboy checks the lifeState ( https://community.bistudio.com/wiki/lifeState ) of the player to detect a change in order to kill the unit and attach it to the mace.

if !(lifeState _unit == _lifeState) then

Nevertheless, I tried updating the logic to be based on something else (like the total amount of damage of the player)

getAllHitPointsDamage player

 but without success...

Unfortunately, we cannot increase the "Player Critical Damage Threshold" value above 1.0 and use your script currently (if we want player to be killed and attached on the mace). If you have a suggestion on how i could update the code feel free to tell me and if I manage to make it work I will post the "solution" here 🙂 . 

Share this post


Link to post
Share on other sites

FOUND A SOLUTION:
just replace:

	private _future = time + 10;
	private _lifeState = lifeState _unit;
	waitUntil {sleep .1; !(lifeState _unit == _lifeState) or time > _future};
	if !(lifeState _unit == _lifeState) then

by:

if ((_unit distance _mace) < 3) then

in files JBOY_punjiMaceTrap.sqf and JBOY/mace/maceVictim.sqf.
 

Share this post


Link to post
Share on other sites
10 hours ago, MeatAlive said:

FOUND A SOLUTION:

Good job, way to stick with it until you found something that worked for you.  I know nothing about ACE Medical, so can't help.  Glad you have something working.  Have fun!  Post a video or screenshot if its convenient (I love seeing my traps used in the wild!).

Share this post


Link to post
Share on other sites

I reworked and improved on johnnyBoy's scripts by making it work on local and dedicated server:
Johnnyboy for original implementation of mace trap that my scripts are based on Savage Game Design for the objects and sound files used by this script.

 

HOW TO ADD THESE TRAPS TO YOUR MISSION

1. Place a Whip Trap object in the editor. The direction you set the trap will be the direction the mace will swinging. 2. In the Whip Trap object's init field, put the following code:

[[this, 'WEST'], "functions\TRAPS\swinging\columbia_fnc_create_swinging_mace_trap.sqf"] remoteExec ["execVM", 0, true];

or 

[[this, _trap_height, _tree_type], "functions\TRAPS\falling\columbia_fnc_create_falling_mace_trap.sqf"] remoteExec ["execVM", 0, true];

_trap_height: Integer (default 0, will allow the height to be automatically managed depending on _tree_type)

_tree_type: Integer
 

0: no tree.

1: "\vn\vn_vegetation_f_exp\tree\vn_t_ficus_big_f.p3d"

2: "\vn\vn_vegetation_f_exp\tree\vn_t_inocarpus_f.p3d"

3: "vn\vn_vegetation_f_exp\tree\vn_t_palaquium_f.p3d"

 

For more information (or to see the code) check https://github.com/gerard-sog/arma3-macvsog-columbia-scripts , https://github.com/gerard-sog/arma3-macvsog-columbia-scripts/tree/main/functions/TRAPS

 

  • Thanks 1

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

×