Jump to content

Recommended Posts

Oh boy, I'm so dumb. I completely missunderstood the use of the Hit Eventhandler. xD

Howerver, now that brings me to an issue: I want to make it so, that whenever a Zombie attacks and hits a unit a script/function is executed. Any idea how I could do that?

Share this post


Link to post
Share on other sites
44 minutes ago, Moon_chilD said:

Oh boy, I'm so dumb. I completely missunderstood the use of the Hit Eventhandler. xD

Howerver, now that brings me to an issue: I want to make it so, that whenever a Zombie attacks and hits a unit a script/function is executed. Any idea how I could do that?

 

I use dammaged or hit eventhandlers for that, and filter out non zombie attackers before starting the script triggered by the eventhandler

 

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Hit

 

There should be atleast a hit eventhandler already in the zombie module of ravage. 

Else i have an example that I can send you once i get to my pc. 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

If I understand it right, the hit Eventhandler only fires on the person getting hit. Therefore I guess the option in the Zombie Module can not be used for what I want to do (I want to add an infection script I wrote). 

I guess I could use the hit evenhandler on all player and add a check for the source of the damage to the script. I just wonder if the Zombie will actually be the Source. I can test it, would still not say no to that example ;3

Share this post


Link to post
Share on other sites

My infection script works with dammaged EH applied to all players and AI, i am still happy with it and can recommend this EH for such script. 

 

this addEventHandler ["Dammaged", { params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"]; }];

 

If (_shooter != "zombie") exitwith {} ;

 

.... Your code here.... 

 

"zombie" (or maybe "zombies") is the config parent for ravage zombies class

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Seems to work @Vandeanson, except that for some reason it does not like this: "If (_shooter != "zombie") exitwith {} ;"
Which is odd. I get the error: "Error in expression" for "!=" but I don't know why. (!(_shooter != "zombie") doesn't work either). 

But I'll find a different solution for that. Thank you for the help!

(zombie is right by the way)

Share this post


Link to post
Share on other sites

Ah yeah i thought so.. Hmm i forgot what i used... 

 

Try !isKindOf "zombie" 

 

This searches also the subtypes of config entries. 

 

I think != or !isEqual is looking for exactly the same object

Share this post


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

The only thing that's stopping a pure Ravage/GM only hybrid is trader backpacks, they still spawn with either vanilla bergens or carryalls, @haleks any way traderSupply could be amended to spawn traders with GM only packs?

  Reveal hidden contents

luNUfQJ.jpg

As for the rest, trader experience is perfect, he only sells GM gear, hell he's even selling my own EO GM uniforms I added to the gearpool array, that's really awesome the trader scripts pick up on that. Bought a snazzy Combat Uniform for $30. :rthumb:

 

 

For the moment, I'm afraid it's impossible to define your own backpacks - the classnames are stored in a variable local to a script so it can't be manipulated from the "outside". 😕

But adding a global variable to deal with that is easy peazy - I'll take care of that once I resume work on Ravage.

 

Good news otherwise - I realise I totally forgot to test the upgraded gearpool set-up on traders! 😄

It's nice to see they are behaving.

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, Vandeanson said:

Ah yeah i thought so.. Hmm i forgot what i used... 

 

Try !isKindOf "zombie" 

 

Yep, _shooter isKindOf "zombie" is the way to go.

Alternatively - and if you don't need to return the shooter itself - it can more reliable to check for the ammo classname :

_projectile isEqualTo "rvg_zedAmmo"

or

(typeOf _projectile) isEqualTo "rvg_zedAmmo"

I can't remember the exact syntax right now.

  • Like 1

Share this post


Link to post
Share on other sites

Mhhh still having issues though I think they are more Arma issues than Ravage ones but maybe someone knows why:

So whenever I don't add a check for the Zombie all works fine. My script fires and everything works as expected. 
When I add the check (either with Vandeansons or haleks' way) nothing happens. So I went out and debugged a bit. 

I added this  "hint format ["%1\n%2\n%3\n%4",_unit,_shooter,_damage,_projectile];"

What I then get is something like:
bis_o1
<NULL-object>
0.45
<NULL-object>

What is interesting is: before <NULL-object> is shown it says something else for a fraction of a second. (I would guess it shows what actually is supposed to be there. So zombie_walker and  rvg_zedAmmo)

Anybody knows whats going on and what I could do (and maybe what I do wrong xD).

  • Like 1

Share this post


Link to post
Share on other sites

@Moon_chilD It might be easier to work with the HitPart EH :

this addEventHandler ["HitPart", {
	(_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
	if (count _ammo isEqualTo 3) exitWith {};//undefined origin (fall, collisions etc)
	if ((_ammo # 4) isEqualTo "rvg_zedAmmo") then {
		hint "Goddamn zombie!"
	};
}];

 

  • Like 3
  • Thanks 1
  • Haha 2

Share this post


Link to post
Share on other sites

Awesome, works now. Thank you two for your help. :3

  • Like 1

Share this post


Link to post
Share on other sites

It's possible to have authentic GM car patrols... 

Spoiler

ORE8q4m.jpg

Tf0GQyE.jpg

uLin26m.jpg

YkKaDuy.jpg

MeWw8R4.jpg

 

"gm_ge_army_kat1_451_cargo_wdl","gm_ge_army_u1300l_repair_wdl","gm_ge_army_kat1_451_reammo_wdl","gm_ge_army_kat1_451_refuel_wdl"

:rthumb:

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
8 minutes ago, Moon_chilD said:

Awesome, works now. Thank you two for your help. :3

Also, note that (atleast when using the dammaged EH) one strike by a Z might be registered multiple times, and hence is triggered multiple times. Your infection effect (maybe damage over time loop) would be triggered multiple times, if you dont manage this. 

 

Not sure if that fact also applies to haleks version. 

 

Cheers

Vd

  • Like 1

Share this post


Link to post
Share on other sites
56 minutes ago, haleks said:

"Goddamn zombie!"

😁

Will try that EH too, atleast using the projectile as filter seems to be faster. Thanks! 

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, Vandeanson said:

Also, note that (atleast when using the dammaged EH) one strike by a Z might be registered multiple times, and hence is triggered multiple times. Your infection effect (maybe damage over time loop) would be triggered multiple times, if you dont manage this. 

 

Not sure if that fact also applies to haleks version. 

 

Cheers

Vd

 

I reckon "HitPart" is safer to use in that regard.

"HandleDammage" should only be used if you wish to override the final damage; for any other use, I would suggest using "hit" or "hitPart". 😉

Share this post


Link to post
Share on other sites
28 minutes ago, EO said:

It's possible to have authentic GM car patrols... 

  Reveal hidden contents

ORE8q4m.jpg

Tf0GQyE.jpg

uLin26m.jpg

YkKaDuy.jpg

MeWw8R4.jpg

 


"gm_ge_army_kat1_451_cargo_wdl","gm_ge_army_u1300l_repair_wdl","gm_ge_army_kat1_451_reammo_wdl","gm_ge_army_kat1_451_refuel_wdl"

:rthumb:

 

Those GM vehicles look absolutely dope - that truck feels much more menacing than any offroad! ❤️

  • Like 2

Share this post


Link to post
Share on other sites

@haleks Note that i mean the dammaged one, not handledammage;) 

 

this addEventHandler ["Dammaged", { params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"]; }];

  • Like 1

Share this post


Link to post
Share on other sites

So considering the issue I'm having with the indoor looting bug in my mission (which is most likely caused by my manually placed items, which would take a very long time to debug). Is there any way for us to have the "old" interior looting system back that we had before the new one?

Share this post


Link to post
Share on other sites
2 hours ago, lv1234 said:

So considering the issue I'm having with the indoor looting bug in my mission (which is most likely caused by my manually placed items, which would take a very long time to debug). Is there any way for us to have the "old" interior looting system back that we had before the new one?

 

What's the bug? If the items are being deleted that you're placing down then the Ravage module's are doing their jobs, if you have the "cleanup" option set to "yes" then all the items you have hand placed WILL be deleted... Simply put the cleanup function to "No" and it should resolve your issue... Though you should know that doing this WILL cause eventual build up over time of mission items and can lead to game crashes... This is why Halek's has the dynamic loot in the first place. If you're wanting custom loot, I recommend placing loot crates around the map (basically stashes) and then using "addItemCargo" you can manually add items you'd like to be within your crates Just by using their specific class names... (beans, bacon, rice, water, soda... etc...) If you need further assistance, or have further questions you know where we're all at! 🙂

Share this post


Link to post
Share on other sites

By the way, dunno if these have been reported already. I'm currently playing your Singleplayer missions and this keeps poping up when trying to search an object (only occasionally and not everytime). Whenever the error pops up the inventory window opens for a fraction of a second and closes again:

21:33:33 Error in expression <m);
_lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 35>
21:33:33   Error position: <_loot, 1];
_lootholder setdir (random 35>
21:33:33   Error Undefined variable in expression: _loot
21:33:33 File ravage\code\rvgLoot\fn_checkLoot.sqf, line 32

And this one pops up every now and then while moving around:
 

21:42:20 ERROR: Switch uniform! Uniform is not supported by soldier
21:42:20 Uniform U_BasicBody is not allowed for soldier class Bandit_Renegade
21:42:20 Error in expression <Random rvg_backpacks;
_unit addBackpack _backpack;
clearAllItemsFromBackpack _un>
21:42:20   Error position: <_backpack;
clearAllItemsFromBackpack _un>
21:42:20   Error Undefined variable in expression: _backpack
21:42:20 Error in expression <ectRandom rvg_goggles;
_unit addGoggles _goggle;
};
};
if (!((count rvg_nvgs) is>
21:42:20   Error position: <_goggle;
};
};
if (!((count rvg_nvgs) is>
21:42:20   Error Undefined variable in expression: _goggle

 

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, Moon_chilD said:

By the way, dunno if these have been reported already. I'm currently playing your Singleplayer missions and this keeps poping up when trying to search an object (only occasionally and not everytime). Whenever the error pops up the inventory window opens for a fraction of a second and closes again:

[...]

And this one pops up every now and then while moving around:
[...]

 

 

Ghaaah!

vadernoo.jpg

 

(Thanks for reporting, I'll investigate as soon as technically feasible)

  • Haha 4

Share this post


Link to post
Share on other sites
23 hours ago, MuRaZorWitchKING said:

 

What's the bug? If the items are being deleted that you're placing down then the Ravage module's are doing their jobs, if you have the "cleanup" option set to "yes" then all the items you have hand placed WILL be deleted... Simply put the cleanup function to "No" and it should resolve your issue... Though you should know that doing this WILL cause eventual build up over time of mission items and can lead to game crashes... This is why Halek's has the dynamic loot in the first place. If you're wanting custom loot, I recommend placing loot crates around the map (basically stashes) and then using "addItemCargo" you can manually add items you'd like to be within your crates Just by using their specific class names... (beans, bacon, rice, water, soda... etc...) If you need further assistance, or have further questions you know where we're all at! 🙂

It seems that every time i touch the indoor looting items, I either take damage or die which seems to be caused by manually placed camps as deleting all of them takes away the issue 

 

edit: it still happens but less severely. 

Share this post


Link to post
Share on other sites

I love it how most subscribers to my missions / Ravage complain about how the Dynamic loot system doesn't give "ANY" loot at all.... Even though I just yoinked an M16A2 out of a garbage pile at the Radio tower camp (aka Green Mountain) I even had two 5.56 mags on me, time to deck this baby out, where's a damn bandito camp when you need one VD?! 😉  😂

 

 

It's time for some huntin' boys, got my Survival suit thanks to EO, so no worries on the pouring rain if I run into a thunderstorm, or even a micro burst... I'll stay nice and toasty!  🌡️

  • Like 4

Share this post


Link to post
Share on other sites
12 hours ago, MuRaZorWitchKING said:

I love it how most subscribers to my missions / Ravage complain about how the Dynamic loot system doesn't give "ANY" loot at all....

 

Sometimes I wonder how long people play or test before posting feedback...

I've been asked to restore the old loot system fairly often (before the introduction of the ambient furniture system), on the basis that it was giving more loot... But the code handling the actual loot spawn (not the containers) has always been the same between the two versions - the "shipping" method is the only thing different.

 

I reckon it boils down to lack of patience : play-testing or balancing a sandbox mission of potentially big scale is no easy task, no matter how streamlined the process may be.

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, haleks said:

 

I reckon it boils down to lack of patience

 

THIS. ^^^ 

 

I play-test my missions for hours, and hours before a release, or a patch, but then you have someone who comes in and hasn’t even been playing ten minutes telling me that the loot system is broken. 

 

CLASSIC. 

 

😂

  • Like 3
  • Haha 2

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

×