Bonjour, vous n'êtes actuellement pas connecté sur le forum
Contacter un administrateur :: Se connecter :: S'enregistrer


Armée de l'Ombre


Nouveau sujet Répondre Imprimer Syndication RSS 2.0

Afficher une image description.ext


Membre
Avatar de henri73
  • Messages : 2
  • Inscrit : 29 Septembre 2013
  • Statut : Hors ligne
 
Lien vers ce message 29 Septembre 2013, 19:58
Message édité 4 fois, dernière édition par henri73, 30 Septembre 2013, 20:08  

Bonjour,

J'essaie temps bien que mal d'insérer une ou des images dans mon script depuis des heures le meilleur résultat que j'ai eu c'était le nom de l'image qui s'affichai avec votre tuto http://www.clan-ado.fr/wiki/151-afficher-une-image.html

Voici mes scripts la pour l'instant si on le teste tout fonctionne sauf aprês le petit sleep de 3sec qui m'affiche un message d'erreur "ressource title titre1 no found"

init.sqf
enableSaving [false,false];

if (player == player) then 
{

_null = [] execVM "scripts\intro.sqf";


};



intro.sqf
_null = [] spawn
{  
TitleRsc ["Introdialog","Plain"];
sleep 3;
TitleRsc ["titre1","Plain"];
};


description.ext
//loadScreen = "images\logo.jpg";
disabledAI = 1;
joinUnassigned = 0;
RespawnDialog = 0;




class Header
{
	gameType = TDM; 
	minPlayers = 1; 
	maxPlayers = 20; 
	playerCountMultipleOf = 1; 
};




class RscTitles
{
	titles[] = {"Introdialog","titre1"}; 

	
			class Introdialog
		{	
			idd = -1;	
			movingEnable = false;
			duration = 12; 
			name = "Introdialog"; 
			controls[] = {"Contextedialog","Contextefr","Contexteeng","Frenchtitle","Line1french","Line2french","Line3french","Line4french","Line5french",
			"Line6french","Englishtitle","Line1english","Line2english","Line3english","Line4english","Line5english"};

			class Contextedialog		
			{
				access = 0;
				type = 0;
				idc = 2;
				style = 0;
				colorBackground[] = {0,0.05,0,0.75};
				colorText[] = {1,1,1,1};
				font = "puristaMedium";
				sizeEx = 0.1;
				lineSpacing = 0;
				colorBorder[] = {1,0,0,0};
				text = "";
				shadow = 0;
				x = - 0.2;
				y = 0;
				w = 1.3;
				h = 1;	
			};
			class Contextefr : Contextedialog	
			{
				colorBackground[] = {0,0,0,1};
				h = 0.095;	
			};
			class Frenchtitle		
			{
				access = 0;
				type = 0;
				idc = 4444;
				style = 0;
				borderSize = 0;
				colorBackground[] = {0,0.05,0,0};
				colorText[] = {1,1,1,1};
				font = "puristaMedium";
				sizeEx = 0.1;
				lineSpacing = 0;
				text = "FRENCH >>";
				shadow = 2;
				x = - 0.18;
				y = -0.46;
				w = 1.3;
				h = 1;	
			};
			class Line1french : Frenchtitle	
			{
				sizeEx = 0.055;
				text = "VOTRE TEXTE";
				x = - 0.18;
				y = -0.37;
				w = 1.3;
				h = 1;	
			};
			class Line2french : Line1french	
			{
				text = "VOTRE TEXTE";
				y = -0.31;	
			};
			class Line3french : Line1french	
			{
				text = "VOTRE TEXTE";
				y = -0.25;	
			};
			class Line4french : Line1french
			{
				text = "VOTRE TEXTE";
				y = -0.19;	
			};
			class Line5french : Line1french
			{
				text = "VOTRE TEXTE";
				y = -0.13;	
			};
			class Line6french : Line1french
			{
				text = "VOTRE TEXTE";
				y = -0.07;	
			};
			class Englishtitle : Frenchtitle	
			{
				text = "ENGLISH >>";
				y = 0.01;	
			};
			class Contexteeng : Contextefr	
			{
				y = 0.47;	
			};
			class Line1english : Line1french	
			{
				text = "VOTRE TEXTE";
				y = 0.1;	
			};
			class Line2english : Line1french	
			{
				text = "VOTRE TEXTE"; 
				y = 0.16;	
			};
			class Line3english : Line1french	
			{
				text = "VOTRE TEXTE"; 
				y = 0.22;	
			};
			class Line4english : Line1french
			{
				text = "VOTRE TEXTE"; 
				y = 0.28;	
			};
			class Line5english : Line1french
			{
				text = "VOTRE TEXTE"; 
				y = 0.35;	
			};
		};

};		
		
			
			
			
		class titre1
		{	
			idd = -1;	
			movingEnable = false;
			duration = 12; 
			name = "titre1"; 
			controls[] = {"RscPicturePerso","RscTypePerso","image1"};	
			
#define FONT_Z          "PuristaMedium"
#define CT_STATIC       0
#define ST_PICTURE      48 

class RscPicturePerso
{
        idc = -1;
        type = CT_STATIC;
        style = ST_PICTURE;
        font = FONT_Z;
        colorBackground[] = {0,0,0,0};
        colorText[] = {1,1,1,1};
        sizeEx = 0.02;
};

class RscTypePerso
{
        idd = -1;
        movingEnable = 0;
        duration = 6;
};


        class titre1 : RscTypePerso
        {

                class image1: RscPicturePerso
                {
                        x = 0.4;
                        y = 0.3;
                        w = 0.2;
                        h = 0.25;
                        text = "fond.jpg";
                };
        };
};
};





j'ai rajouter :

class RscTitles
{
titles[] = {"Introdialog","titre1"};

*******************************


class titre1
{
idd = -1;
movingEnable = false;
duration = 12;
name = "titre1";
controls[] = {"RscPicturePerso","RscTypePerso","image1"};

#define FONT_Z "PuristaMedium"
#define CT_STATIC 0
#define ST_PICTURE 48

class RscPicturePerso
{
idc = -1;
type = CT_STATIC;
style = ST_PICTURE;
font = FONT_Z;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = 0.02;
};

class RscTypePerso
{
idd = -1;
movingEnable = 0;
duration = 6;
};


class titre1 : RscTypePerso
{

class image1: RscPicturePerso
{
x = 0.4;
y = 0.3;
w = 0.2;
h = 0.25;
text = "fond.jpg";
};
};
};
}

Membre
Avatar de JonyBIgooD
  • Messages : 96
  • Inscrit : 19 Mai 2013
  • Statut : Hors ligne
 
Lien vers ce message 29 Septembre 2013, 20:16

:militaire1: Salut henri73

Tu veux insérer un icône ou logo au démarrage de t'as mission avec un texte, l'image doit être en .paa (png retravaillé avec Textview2) à la taille 256x256

Je te transmet une copie de mon fichier description.ext c'est plus simple que ton code mais efficace ! :fsb2_godgrace:

/////////////////////////////////////////////////////////////////////
class RscPicture
{
	type=0;
	idc=-1;
	style=48;
	colorBackground[]={0,0,0,0};
	colorText[]={1,1,1,1};
	font = PuristaMedium;
	size=0;

};

class RscStdText
{
	type = CT_STATIC;
	idc = -1;
	style = ST_LEFT;
	h = 0.04;
	colorBackground[] = {0, 0, 0, 0};
	colorText[] = {TextColor, 0.75};
	font = PuristaMedium;
	sizeEx = 0.02;

};


class RscTitles
{
	titles[]={"texte1"};

	class texte1
	{
		idd=0;
		movingEnable=0;
		duration=5;
		fadein=0;
		name="texte1";
		controls[]={"ST","ST2","BONTA"};

		class ST: RscStdText
		{
			text="JonyBIgood vous prsente :";
			x=0.05;
			y=0.6;
			w=0.8;
			h=0.05;
			colorBackground[]={0,0,0,0};
			colorText[]={0,1,0,1};
			size=1;
			sizeEx = 0.05;
		};
		class ST2: RscStdText
		{
			text="OPERATION BULLDOG";
			x=0.50;
			y=0.75;
			w=1.05;
			h=0.1;
			colorBackground[]={0,0,0,0};
			colorText[]={ 1, 1, .5, 1};
			size=1;
			sizeEx = 0.1;
		};
		class BONTA : RscPicture
		{
			style=48;
			text="logointro.paa";
			x=0.4;
			y=0.2;
			w=0.2;
			h=0.25;
			size=1;
			sizeEx = 0.04;
		};	
	};	
};



J'espêre avoir pu t'aider ?

Bonne Edition ! :fsb2_drink:


http://img401.imageshack.us/img401/8648/signatureclanado1300x16.jpg

// JonyBIgooD // Chaine Youtube
http://www.youtube.com/channel/UC7Hj1ldxwyjqQxUF4MXUN9w

Mission Maker
Avatar de poran
  • Age : 49 ans
  • Messages : 883
  • Inscrit : 28 Mars 2013
  • Statut : Hors ligne
  • Spécialité : Génie Expert
 
Lien vers ce message 30 Septembre 2013, 19:34

je dirais, et je rejoins Jony, ton fichier description est étrange, disons que nous "travaillons" différemment.

suis l'exemple que ta donné Jony, tu peux aussi te co sur le serveur ado, pour prendre une mission ado, tu y verras quasi la même façon de faire.

Membre
Avatar de henri73
  • Messages : 2
  • Inscrit : 29 Septembre 2013
  • Statut : Hors ligne
 
Lien vers ce message 30 Septembre 2013, 20:07

ok merci, de m'avoir aider un peu j'ai réussi à l'intégrer
Répondre





.