Jump to content
Sign in to follow this  
Abima

Guys help me with this script

Recommended Posts

Guys help me with this script. Wanted to create a anti gas for my alti life rpg. This is correct?

private["_hndl","_hnd2","_hnd3"];
if ( vest player!= "G_Combat" or vest player !="G_Tactical_Black") then
{
forceEnd
}
else
{
_hndl = ppEffectCreate ["colorCorrections", 1501];
_hndl ppEffectEnable true;
_hndl ppEffectAdjust [1.0, 1.0, 0.0, [1.0, 1.0, 1.0, 0.95], [1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 0.0]];
_hndl ppEffectCommit 0;


_hnd2 = ppEffectCreate ["chromAberration", 201];
_hnd2 ppEffectEnable true;
_hnd2 ppEffectAdjust [1, 1, true];
_hnd2 ppEffectCommit 0;


_hnd3 = ppEffectCreate ["chromAberration", 201];
_hnd3 ppEffectEnable true;
_hnd3 ppEffectAdjust [0.5, 0.5, true];
_hnd3 ppEffectCommit 0;

playSound "Flashbang";
player setFatigue 1; // sets the fatigue to 100%

sleep 30;
_hndl ppEffectAdjust [1.0, 1.0, 0.0, [1.0, 1.0, 1.0, 0.5], [1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 0.0]];
_hndl ppEffectCommit 0;
_hnd2 ppEffectAdjust [0.5, 0.5, true];
_hnd2 ppEffectCommit 0;
_hnd3 ppEffectAdjust [0.3, 0.3, true];
_hnd3 ppEffectCommit 0;
player setFatigue 1; // sets the fatigue to 100%
sleep 30;
_hndl ppEffectAdjust [1.0, 1.0, 0.0, [1.0, 1.0, 1.0, 0.3], [1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 0.0]];
_hndl ppEffectCommit 0;
_hnd2 ppEffectAdjust [0.3, 0.3, true];
_hnd2 ppEffectCommit 0;
_hnd3 ppEffectAdjust [0.1, 0.1, true];
_hnd3 ppEffectCommit 0;
player setFatigue 1; // sets the fatigue to 100%
sleep 30;
_hndl ppEffectAdjust [1.0, 1.0, 0.0, [1.0, 1.0, 1.0, 0.1], [1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 0.0]];
_hndl ppEffectCommit 0;
_hnd2 ppEffectAdjust [0.1, 0.1, true];
_hnd2 ppEffectCommit 0;
_hnd3 ppEffectAdjust [0.05, 0.05, true];
_hnd3 ppEffectCommit 0;
player setFatigue 1; // sets the fatigue to 100%
sleep 14;
ppEffectDestroy _hndl;
ppEffectDestroy _hnd2;
ppEffectDestroy _hnd3;
}
sleep 5;

thank you for help!!! ^^

Share this post


Link to post
Share on other sites

@Abima, please try to post in the correct section. Ive moved your thread.

Cheers

Share this post


Link to post
Share on other sites
@Abima, please try to post in the correct section. Ive moved your thread.

Cheers

@R0adkill, thanks. More help me ae with this script! Please!!!!

Share this post


Link to post
Share on other sites

are you getting errors with this and if you are what is it? or is it just not working ? also I dont rmember but you want to put like end; or force end or something like that because just basically keeps the script running forever after you run it (wont go back through it until w/e the effect has to happen to cause this script to start), but just slows down the game. Atleast for me it does...

if its just how it looks... you got all your ";" at the end and i cant find any errors

Share this post


Link to post
Share on other sites
are you getting errors with this and if you are what is it? or is it just not working ? also I dont rmember but you want to put like end; or force end or something like that because just basically keeps the script running forever after you run it (wont go back through it until w/e the effect has to happen to cause this script to start), but just slows down the game. Atleast for me it does...

if its just how it looks... you got all your ";" at the end and i cant find any errors

I want the "G_Combat" and "G_Tactical_Black" protect the soldier. For he does not suffer the effect of flashbang . . . As if it were an antidote flashbang. More "if" does not work. Because it kills the script. Understand?

Share this post


Link to post
Share on other sites
I want the "G_Combat" and "G_Tactical_Black" protect the soldier. For he does not suffer the effect of flashbang . . . As if it were an antidote flashbang. More "if" does not work. Because it kills the script. Understand?

Can someone help with this code?

Share this post


Link to post
Share on other sites

Put that script into your own mission (example: C:\Users\User\Documents\Arma 3 - Other Profiles\User\missions\@RSPack_2.Stratis)

Call it "Myscript.sqf" (without the quotes) and start arma 3.

Once your in the arma 3 editor with your mission opened, in the unit's init type this:

null = execVM "Myscript.sqf";

After that, save the mission and preview it.

If there is any other probs you would like help on, let me know. :D

Regards,

Ranwer

NOTE: Here is the bible for all types of scripts the arma engine uses: https://community.bistudio.com/wiki/Category:Scripting_Commands

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
Sign in to follow this  

×