BDC's Script/Addon Help Thread

BDC

Well-Known Member
Anybody need any help with anything I've written and don't want to use PM's? Go for it here and I'll be happy to help out.

B
 
This isn't working for me, I noticed that it checks for s_player_tauntzed but it isn't set anywhere...could this be missing from the variables.sqf file?
I'm about to try adding s_player_tauntzed = -1; to the self actions section in variables.sqf
 
Howdy Kaotix, it doesn't need to be added to the bottom of fn_selfActions.sqf or to variables.sqf. Are you sure when you're trying it out that you're in range of the target (under 36m) and have the zombie targetted on the cursor? You may have to turn cursor on to verify it.
 
I will try again later, but so far I'm not getting anything at all...definitely pointing at a zed, got crosshair on from my weapon. And the zed was pretty close im sure. I was curious as I've added around 10 other scripts today and yours, unfortunately, is the only one not working correctly. Yet everything looks to be the same as every other script I added so nothing out of the ordinary in setup or scripting...
I'll let you know how I get on later.
 
Hey Kaotix, let's verify we've got the same thing in fn_selfActions.sqf which motivates the option to pop up:

Code:
// Taunt Nearby Zombies if player has hunting knife and has a "live" zombie targeted (35 or less distance to player)
    if ((cursorTarget isKindOf "zZombie_base") and (alive cursorTarget) and !_inVehicle and _canDo and (player distance CursorTarget < 36)) then {
      //_pos = getPosATL player;
      //_zombies = _pos nearEntities ["zZombie_Base", 35];
      //_zcount = count _zombies;
      //if ((s_player_tauntzed < 0) and (_zcount > 3)) then {
      if (s_player_tauntzed < 0) then {
        if (!_hasKnife) then {
          s_player_tauntzed = player addAction [("<t color=""#A0A0A0"">" + ("Taunt nearby zombies (Bleed and Scream)") + "</t>"), "fixes\player_tauntnearbyzed.sqf",[], 1, false, true, "", ""];
        } else {
          s_player_tauntzed = player addAction [("<t color=""#FF3232"">" + ("Taunt nearby zombies (Bleed and Scream)") + "</t>"), "fixes\player_tauntnearbyzed.sqf",[], 1, false, true, "", ""];
        };
      };
      } else {
      player removeAction s_player_tauntzed;
      s_player_tauntzed = -1;
    };

The conditions required for getting the option to pop up, either in red or in gray, are these:

- Target must be a zombie (cursorTarget isKindOf "zZombie_base")
- Zombie must be alive
- Player must not be in a vehicle
- Player distance to zombie target must be under 36m
- and Player must not be on a ladder
 
Just rebooting my server now with your version pasted in (slight change for directory of the script 'fixes' is 'custom' for me) I'll let you know once I get back in game. For reference, I'm running this on Epoch on Chernarus.
 
Ok cool Kaotix, let me know. Thanks for the response by the way. What I posted in the Code section is directly from my running server. I used the taunt last night once too.
 
So far nothing, i was right behind a zed just and I have no options to taunt. Something isn't triggering, unless it doesnt like something in the IF statement?
 
It would be something like that, Kaotix. The s_player_tauntzed playeraction is irrelevant as it's set to -1 in the event that it doesn't exist.

Placement of the section might have something to do with it. It needs to be above the larger section when dealing with a !isNull CursorTarget. It needs to be above that section near where the 'Grab Flare' part is.

Code:
if ((cursorTarget isKindOf "zZombie_base") and (alive cursorTarget) and !_inVehicle and _canDo and (player distance CursorTarget < 36))

This chunk, the if statement -- the isKindOf zZombie_base doesn't require a prior variable, neither does the Alive cursorTarget condition, but the !_inVehicle and _canDo do. Can you check and make sure those are in there? If either of those are triggered as false, you'll never see the option pop up. That's the only thing I can really think of here.

B
 
I've just moved it above all my other scripts and still nothing. A number of people have tested it too so not sure what's wrong. I'm tempted to take out the cursorTarget and alive part, would the script still work? but obviously just allow you to taunt even if there's not a targeted zombie? If I do speed < 0 as well or something.
 
I've just moved it above all my other scripts and still nothing. A number of people have tested it too so not sure what's wrong. I'm tempted to take out the cursorTarget and alive part, would the script still work? but obviously just allow you to taunt even if there's not a targeted zombie? If I do speed < 0 as well or something.


Yeah it would. It would just remove the "pickyness" of when the option should show up. The only reason why I made it so particular was to keep it from being up all the time since it's a scroll option. But yep, for testing, you can remove some of those conditions and see what happens.

B
 
Try this:

Code:
if (!_inVehicle and _canDo) then {

That will make it to where the option will pop up as long as you're not mounted in a vehicle and are not on a ladder. Make sure the two conditions _inVehicle and _canDo are defined above this chunk.
 
This is what I'm trying now...

Code:
if ( !_inVehicle && _canDo && (speed player <= 1) ) then {

Just about to test.
 
This has not worked either! No idea what is going wrong...I'm so confused right now.
I've literally just copied the self bloodbagging code and replaced all the var names to match your original ones, stripped out most of the IF statements to be left with this which I'm about to re-test!

Code:
if ((speed player <= 1) && !_inVehicle && _canDo) then {
    if (s_player_tauntzed < 0) then {
        s_player_tauntzed = player addaction[("<t color=""#A0A0A0"">" + ("Taunt nearby zombies") +"</t>"),"custom\player_tauntnearbyzed.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_tauntzed;
    s_player_tauntzed = -1;
};
 
Kill the speed player part. I'm not sure where that came from but that's not part of my code.
 
I added that part in myself, pulled from another script to avoid spamming the actions menu.
Regardless, I managed to get it working after pulling out the zombie targeting so not sure what's going on there.
Thanks for your help in trying to get it working. I have actually opted not to use the mod now after all this >_<
 
Hmmm, that's strange. I wonder if there's a difference in some of the naming variables between vanilla and Epoch. Well, at least you gave it a good try! Thanks for trying.

B
 
Good deal Caboose.

I've already updated this two generations or so for 1.8 use but I've not posted it yet. I even came up with custom sounds for it but it's only on my server so far.
 
Back
Top