Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Revan87

Creating an addon stealth camo

Recommended Posts

Hi im planning on making a stealth camo addon which is an object or item that you can pick up as a regular solder and when you use it you can be invisible to the enemy is it possible and if so what programs do i need to create the addon and the script?

Share this post


Link to post
Share on other sites

hi,

Hi im planning on making a stealth camo addon which is an object or item that you can pick up as a regular solder and when you use it you can be invisible to the enemy is it possible and if so what programs do i need to create the addon and the script?

I have not a lot of knowledge in matter of addon making but I think I could help you with the scripting part.

The scripting part should be like this:

init.sqs

;*******************************
;Init Script by Nikiller v0.9b
;contact: [email protected]
;*******************************

;-----------------------------------------------------------------------------------------
; Camo
;-----------------------------------------------------------------------------------------
[nik_CammoSoldier1] exec "camo_action.sqs"

exit

camo_action.sqs

;*******************************
;Camo Action Script by Nikiller v0.9b
;contact: [email protected]
;*******************************

_u = _this select 0

nik_camo=false

#l
~0.01
_acon=_u addAction ["Camo ON","camo_on.sqs"]

_d=0.1
#con
~_d
if (alive _u) then {} else {goto "ende"}
if (nik_camo) then {_u removeAction _acon} else {goto "con"}

~0.01
_acof=_u addAction ["Camo OFF","camo_off.sqs"]

#cof
~_d
if (alive _u) then {} else {goto "ende"}
if !(nik_camo) then {_u removeAction _acof} else {goto "cof"}

if (alive _u) then {goto "l"}

#ende
{_u removeAction _x} forEach [_acon,_oacof]

exit

camo_on.sqs

;*******************************
;Camo ON Script by Nikiller v0.9b
;contact: [email protected]
;*******************************

_u = _this select 0

nik_camo=true
_u setObjectTexture [0,""]
_u setObjectTexture [1,""]
_u setObjectTexture [2,""]
_u setObjectTexture [3,""]
_u setCaptive true

#ende

exit

camo_off.sqs

;*******************************
;Cammo OFF Script by Nikiller v0.9b
;contact: [email protected]
;*******************************

_u = _this select 0

nik_camo=false
_u setObjectTexture [0,"\yourcammoaddon\hands.paa"]
_u setObjectTexture [1,"\yourcammoaddon\head.paa"]
_u setObjectTexture [2,"\yourcammoaddon\legs.paa"]
_u setObjectTexture [3,"\yourcammoaddon\body.paa"]
_u setCaptive false

#ende

exit

cya.

Nikiller.

Share this post


Link to post
Share on other sites

I believe all you need to do is read up on alpha channels, hidden selections, and setobjecttexture. You'll want to make a semi transparent texture using the alpha channels, and to swap out the textures, your addon will need hidden selections to perform a setobjecttexture command on. Check out those terms on the biki.

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  

×