AccueilAccueil  FAQFAQ  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment :
Display 24 boosters Star Wars Unlimited – ...
Voir le deal

 

 changer le background en cours de jeu

Aller en bas 
3 participants
AuteurMessage
blendman
Utilisateur confirmé: Rang **
blendman


Messages : 433
Projet Actuel : Crée des jeux, logiciels, BD, Romans et nouvelles.

changer le background en cours de jeu Empty
MessageSujet: changer le background en cours de jeu   changer le background en cours de jeu EmptyMar 14 Aoû 2007 - 13:27

salut

je suis en train d'essayer de faire un editeur map.

Parmi les fonctions, j'aimerai changer le background en appuyant sur une touche par exemple (j'en ai plusieurs) (je parle du sprite du background , pas du background index de la room).

j'ai essayer plusieurs techniques, mais je n'y suis pas parvenu.

Auriez-vous une méthode ?

merci
Revenir en haut Aller en bas
http://blendman.blogspot.com/
edi9999
Utilisateur confirmé: Rang *****
edi9999


Messages : 2480
Localisation : France
Projet Actuel : theatre flashy

changer le background en cours de jeu Empty
MessageSujet: Re: changer le background en cours de jeu   changer le background en cours de jeu EmptyMar 14 Aoû 2007 - 14:20

Je suis pas sur mais je pense avec background_replace



Voila une explication (en anglais )

background_add(fname,transparent,smooth,preload) Adds the image stored in the file fname to the set of background resources. Only bmp and jpg images can be dealt with. transparent indicates whether the image is partially transparent. smooth indicates whether to smooth the edges. preload indicates whether to preload the image into texture memory. The function returns the index of the new background that you can then use to draw it or to assign it to the variable background_index[0] to make it visible in the current room. When an error occurs -1 is returned.
background_replace(ind,fname,transparent,smooth,preload) Same as above but in this case the background with index ind is replaced. The function returns whether it is successful. When the background is currently visible in the room it wil be replaced also.

_________________
Mes tutos sur le site: -Tutoriel débutant- Tutoriel intermédiaire
Venez sur http://gameplay.c.la pour des tutos sur mon site.
Utilisez des hébérgeurs gratuits et sans temps d'attente!:
http://willhostforfood.com/
Revenir en haut Aller en bas
http://gameplay.c.la/
kamikaz
Utilisateur confirmé: Rang *
kamikaz


Messages : 242

changer le background en cours de jeu Empty
MessageSujet: Re: changer le background en cours de jeu   changer le background en cours de jeu EmptyMar 14 Aoû 2007 - 16:02

background_index = ton nouveau background

ou quelque chose comme sa...

_________________
eille yer ou le cr**iss de bouton pour la toune dancing queen!!!!!!!!! aussi le logo est a chier , mais c un avis personnel avec plein de monde.
Revenir en haut Aller en bas
Contenu sponsorisé





changer le background en cours de jeu Empty
MessageSujet: Re: changer le background en cours de jeu   changer le background en cours de jeu Empty

Revenir en haut Aller en bas
 
changer le background en cours de jeu
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Changer de Background
» Changer de background ?
» Je cherche des cours ! help !
» Me donner des cours svp...
» Cherche programmeur expérimenté

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum Le CBNA :: Développement :: Entraide débutants-
Sauter vers: