Jump to content

Recommended Posts

On 6/13/2022 at 4:12 AM, DerBlitzkrieg said:

Awesome script. Making a mission with it cause its lowkey better than the CBRN mod lmao. One issue, I cant seem to disable the trigger I've spawned. Everything else is working flawless, but I am trying to have the death zone be disabled by mission start, then enabled mid mission at the same time as a smoke artillery barrage my players start to give the illusion of a gas attack. I'm using the method outlined in your original post but it isn't disabling it. Any reason you could think of why?

 

You sure you are setting the variable on the trigger itself? The create zone function returns the trigger, make sure that only server executes the variable change and sync it to all machines.

Share this post


Link to post
Share on other sites

This is so much better then all the CBRN mods we currently have available!
Any chance that you will make this into a mod with Zeus module integration? 
 

Share this post


Link to post
Share on other sites

Hi Diwako!

I have made a trigger (Server Only),
in Init field: !alive rad_source (rad_source is an object, that is the source of radiation), and
in the On Activation field: _trg setVariable ["cbrn_active", false, true];
but it did not turn the zone off.

The zone is working correctly, the chemical detector is measuring the threat, but when the rad_source object destroyed, the radiation and the value of threat on detector is still on.

Share this post


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

Hi Diwako!

I have made a trigger (Server Only),
in Init field: !alive rad_source (rad_source is an object, that is the source of radiation), and
in the On Activation field: _trg setVariable ["cbrn_active", false, true];
but it did not turn the zone off.

The zone is working correctly, the chemical detector is measuring the threat, but when the rad_source object destroyed, the radiation and the value of threat on detector is still on.

 

_trg is a local variable it is undefined outside the script you spawned the zone from. Assign a global variable to it and use that one, then it should work.

Share this post


Link to post
Share on other sites

Many thanks!

 

But... how can i do that? 🙂 Sorry, i am very beginner in scripting.

Can you explain me pls? Or can you show me an example maybe?

Ok, I won't be lazy and look for it.

Share this post


Link to post
Share on other sites

OK, I give up! Unfortunately, I couldn't find anything about it. Please help if it's not a problem.

 

Share this post


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

OK, I give up! Unfortunately, I couldn't find anything about it. Please help if it's not a problem.

 

 

First, the basics:

https://community.bistudio.com/wiki/Variables

 

Your bit of code:

_trg setVariable ["cbrn_active", false, true];

Assuming _trg is meant to refer to the trigger that defines your CBRN zone, then you need to do one of the following:

  1. give the trigger a variable name (a.k.a. a global variable) and then use that name in place of _trg
  2. if the CBRN zone trigger and the trigger where this code is placed in the onAct field are the same trigger, you can just use thisTrigger

So, for option 1, it would look something like this:

myCBRNtriggerName setVariable ["cbrn_active", false, true];

And for option 2:

thisTrigger setVariable ["cbrn_active", false, true];

 

  • Like 1

Share this post


Link to post
Share on other sites

Ok, thx for help, but:
I have placed a car, named "rad_source", a trigger "rad_create", Any Player Present, in the OnAct: "[getPos rad_source, 3.5, 25, 75] call cbrn_fnc_createZone;" and another trigger, named "rad_zone_remove" Cond: "!alive rad_source", OnAct: "rad_create setVariable ["cbrn_active", false, true];"

 

When i blew up the car  "rad_source" (ok, not a good idea to blow up a car with full of radioactive material, just a test 😁 ), the trigger "rad_zone_remove" should remove the radiation zone, but doesn't...

https://imgur.com/LqQFPCC

https://imgur.com/yPYqiuk

https://imgur.com/PloCWZu

 

I need more help to use this great script in my mission...

Share this post


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

Ok, thx for help, but:
I have placed a car, named "rad_source", a trigger "rad_create", Any Player Present, in the OnAct: "[getPos rad_source, 3.5, 25, 75] call cbrn_fnc_createZone;" and another trigger, named "rad_zone_remove" Cond: "!alive rad_source", OnAct: "rad_create setVariable ["cbrn_active", false, true];"

 

When i blew up the car  "rad_source" (ok, not a good idea to blow up a car with full of radioactive material, just a test 😁 ), the trigger "rad_zone_remove" should remove the radiation zone, but doesn't...

https://imgur.com/LqQFPCC

https://imgur.com/yPYqiuk

https://imgur.com/PloCWZu

 

I need more help to use this great script in my mission...

 

cbrn_fnc_createZone is a function that returns the created zone trigger. 

1. Tick server only in your rad_create trigger, as the zone will only be spawnable on the server machine

2. change the statement inside the rad_create trigger to "uhohstinky = [getPos rad_source, 3.5, 25, 75] call cbrn_fnc_createZone;"

3. now inside the rad_zone_remove trigger change the statement to "uhohstinky setVariable ["cbrn_active", false, true];" and make that trigger server only as well.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 2/10/2023 at 8:46 PM, ButcherUA said:

I dont give a f what happenning, but when i start shooting in cbrn scenario some sh*t happens, like mines starts spawning idk, just watch video)
https://youtu.be/QTUJY7v72RU

What ever that pop up is, it aint from this scirpt i am afraid.

  • Like 1

Share this post


Link to post
Share on other sites
On 2/10/2023 at 11:46 AM, ButcherUA said:

I dont give a f what happenning, but when i start shooting in cbrn scenario some sh*t happens, like mines starts spawning idk, just watch video)
https://youtu.be/QTUJY7v72RU

Hi, im getting the same problem/issue/bug/whatever is, have you test this on a server? Gives the same problem when you shot or fixed when you shot a enemy on the server?

Share this post


Link to post
Share on other sites

Hi diwako!

What are the "Turn counter on" and "Turn counter off" in the file "fn_postInit.sqf" used for? I have ACE_microDAGR in my inventory, but can't turn the counter on or off.

Share this post


Link to post
Share on other sites
On 2/18/2023 at 3:11 AM, diwako said:

What ever that pop up is, it aint from this scirpt i am afraid.

 

Had the same issue come up. Fire Support Plus was causing the mayhem for me https://steamcommunity.com/sharedfiles/filedetails/?id=2699465073

 

Not suggesting you need to make a fix for it, but wanted to put this out there for those that also were experiencing sudden explosions using this sweet script package.

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

×