• [Probléme] Creation de gyrophares


    Bonjour,
    je suis entrain d’essayer de crée des gyrophares pour une voiture de police mais je n’arrive pas à les faire fonctionner. Je suis encore entrain d’apprendre le SQF donc l’erreur pourrait être causée par un truc tout béte…
    Ceci est le “config.cpp”:

    [...]
    hiddenSelections[] = {"camo","np1","np2","np3","np4","np5","lamp_tr","lamp_tl","lamp_bl","lamp_br"};
    [...]
    class UserActions
    {
    	class lampeggianti_fissi
    	{
    		displayName = "Lampeggianti fissi: ON";
    		position = "";
    		radius = 1000;
    		condition = "driver this == player && alive this";
    		statement = "this setVariable ['A3IL_lamp_fis',1,true]";
    		onlyForplayer = 0;
    	};
    	class lampeggianti_fissi_off: lampeggianti_fissi
    	{
    		priority = 1;
    		showWindow = 0;
    		displayName = "Lampeggianti fissi: OFF";
    		condition = "driver this == player && alive thi";
    		statement = "this setVariable ['A3IL_lamp_fis',0,true]";
    	};
    };
    [...]
    

    Le “model.cfg”:

    [...]
    sections[]=
    {
    	"camo",
    	"glass1",
    	"glass2",
    	"glass3",
    	"glass4",
    	"glass5",
    	"glass6",
    	"glass7",
    	"glass8",
    	"light_l",
    	"light_r",
    	"palivo",
    	"karoserie",
    	"body",
    	"zadni svetlo",
    	"brzdove svetlo",
    	"np1",
    	"np2",
    	"np3",
    	"np4",
    	"np5",
    	"lamp_tr",
    	"lamp_tl",
    	"lamp_bl",
    	"lamp_br"
    };
    [...]
    

    Et ceci est mon script:

    private["_car","_lightstt","_lightstb","_lightsm"]
    _car = _this;
    _lightstt = "\A3IL_Cars\LAM_Huracan\textures\lightbar2.paa";
    _lightstb = "\A3IL_Cars\LAM_Huracan\textures\hazard_led.paa";
    _lightsm = "\A3IL_Common\rvmats\blue_glow.rvmat";
    
    _car setVariable ["A3IL_lamp_fis",0,false];
    
    while{alive _car} do {
    	if(_car getVariable "A3IL_lamp_fis" == 1) then {
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,_lightstb];
    		_car setObjectMaterialGlobal [8,_lightsm];
    		_car setObjectTextureGlobal [9,_lightstb];
    		_car setObjectMaterialGlobal [9,_lightsm];
    		sleep 0.1;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,_lightstb];
    		_car setObjectMaterialGlobal [9,_lightsm];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,_lightstb];
    		_car setObjectMaterialGlobal [9,_lightsm];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,_lightstb];
    		_car setObjectMaterialGlobal [9,_lightsm];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.1;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,_lightstb];
    		_car setObjectMaterialGlobal [8,_lightsm];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,_lightstb];
    		_car setObjectMaterialGlobal [8,_lightsm];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,_lightstb];
    		_car setObjectMaterialGlobal [8,_lightsm];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.05;
    		_car setObjectTextureGlobal [6,_lightstt];
    		_car setObjectMaterialGlobal [6,_lightsm];
    		_car setObjectTextureGlobal [7,_lightstt];
    		_car setObjectMaterialGlobal [7,_lightsm];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    		sleep 0.1;
    	} else {
    		sleep 0.1;
    		_car setObjectTextureGlobal [6,""];
    		_car setObjectMaterialGlobal [6,""];
    		_car setObjectTextureGlobal [7,""];
    		_car setObjectMaterialGlobal [7,""];
    		_car setObjectTextureGlobal [8,""];
    		_car setObjectMaterialGlobal [8,""];
    		_car setObjectTextureGlobal [9,""];
    		_car setObjectMaterialGlobal [9,""];
    	};
    };
    

    Merci.

  • Tu trouveras ta réponse ici.

    Souvent imité, jamais égalé !
    Mon Image
    Chaine de Bartabactext alternatif

  • Fais le avec des animations inspire toi du sample du bateau

    Modérateur www.altisdev.com | Moddeur Français sur Arma 3 | Addons Maker chez www.reallife-rpg.com

  • Je vais essayer, merci!

  • @raffitheo a dit dans [Probléme] Creation de gyrophares :

    private["_car","_lightstt","_lightstb","_lightsm"]

    Tu as oublié le ; à la fin de ta ligne de private ^^

  • Merci @Arkador36 mais le script ne marche toujour pas…

Messages 6Vues 327
Se connecter pour répondre