Inscrit le: 09 Nov 2008 Messages: 58 Sujets: 8 Spécialité en worldedit: création d'unité, declencheurs
Posté le: 17/11/08 15:29 Sujet du message: Problème avec ma multitable
bien le bonjour !
désolé j'ai encore un petit problème ... ma multitable bug légèrement. je m'explique.
lorsque je tue une unité, ma ligne monte normalement. Par contre une fois que les autres joueurs commence en tuer, sa monte toutes les lignes en mêmes temps. je vais faire quelques screen, parce que je sais pas si j'arriverai a me faire comprendre
Secret:
Secret:
Gui:
Trigger:
Creation Copier
Evénements
Temps - Elapsed game time is 0.50 seconds
Conditions
Actions
Set Nombre_Joueur = (Number of players in (All players matching ((((Matching player) controller) Egal à Utilisateur) and (((Matching player) slot status) Egal à Joue)))) Multitable - Create a multiboard with 4 columns and (4 + Nombre_Joueur) rows, titled WarCraft Rivals 0.3A Set Multitable = (Last created multiboard) Multitable - Set the text for (Last created multiboard) item in column 2, row 1 to Joueurs : Multitable - Set the text for (Last created multiboard) item in column 3, row 1 to Tués : Multitable - Set the text for (Last created multiboard) item in column 4, row 1 to Mortes :
For each (Integer A) from 1 to (4 + Nombre_Joueur), do (Actions)
Boucle - Actions
Multitable - Set the display style for (Last created multiboard) item in column 1, row 1 to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Montrer text and Masquer icons Multitable - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 9.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 6.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 6.00% of the total screen width
Set List = 2
Groupe joueur - Pick every player in (All players matching ((((Matching player) slot status) Egal à Joue) and (((Matching player) controller) Egal à Utilisateur))) and do (Actions)
Boucle - Actions
Set Multiboard_Ligne_Joueur[(Player number of (Picked player))] = List Multitable - Set the text for (Last created multiboard) item in column 2, row List to (Joueur_Couleur[(Player number of (Picked player))] + ((Name of (Picked player)) + |r)) Multitable - Set the text for (Last created multiboard) item in column 3, row List to 0 Multitable - Set the text for (Last created multiboard) item in column 4, row List to 0 Set List = (List + 1)
Multitable - Montrer Multitable
Secret:
Gui:
Trigger:
Hero icone
Evénements
Unité - A unit enters (Playable map area)
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Unit-type of (Triggering unit)) Egal à Icone_Uniter[(Integer A)]
Alors - Actions
Multitable - Set the display style for (Last created multiboard) item in column 1, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Triggering unit)))] to Montrer text and Montrer icons Multitable - Set the icon for Multitable item in column 1, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Triggering unit)))] to Icone_icone[(Integer A)]
Sinon - Actions
Secret:
Gui:
Trigger:
Unites tuees
Evénements
Unité - A unit Meurt
Conditions
Actions
Set Unite_Tuer[(Player number of (Owner of (Killing unit)))] = (Unite_Tuer[(Player number of (Owner of (Killing unit)))] + 1) Multitable - Set the text for (Last created multiboard) item in column 3, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Killing unit)))] to (String(Unite_Tuer[(Player number of (Owner of (Killing unit)))]))
Secret:
Gui:
Trigger:
Unites mortes
Evénements
Unité - A unit Meurt
Conditions
Actions
Set Unite_Morte[(Player number of (Owner of (Dying unit)))] = (Unite_Morte[(Player number of (Owner of (Dying unit)))] + 1) Multitable - Set the text for (Last created multiboard) item in column 4, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Dying unit)))] to (String(Unite_Tuer[(Player number of (Owner of (Dying unit)))]))
Secret:
Gui:
Trigger:
Joueurs quitte
Evénements
Joueur - Joueur 1 (Rouge) leaves the game Joueur - Joueur 2 (Bleu) leaves the game Joueur - Joueur 3 (Cyan) leaves the game Joueur - Joueur 4 (Pourpre) leaves the game Joueur - Joueur 5 (Jaune) leaves the game Joueur - Joueur 6 (Orange) leaves the game Joueur - Joueur 7 (Vert) leaves the game Joueur - Joueur 8 (Rose) leaves the game
Conditions
Actions
Multitable - Set the text for (Last created multiboard) item in column 2, row Multiboard_Ligne_Joueur[(Player number of (Triggering player))] to (Joueur_Couleur[(Player number of (Triggering player))] + (A quitté la partie + |r)) Partie - Display to (All players) the text: ((Name of (Triggering player)) + a quité la partie.)
Secret:
Gui:
Trigger:
Couleurs
Evénements
Map initialization
Conditions
Actions
Set Joueur_Couleur[1] = |c00ff0000 Set Joueur_Couleur[2] = |c000000ff Set Joueur_Couleur[3] = |c0000ffff Set Joueur_Couleur[4] = |c00800080 Set Joueur_Couleur[5] = |c00ffff00 Set Joueur_Couleur[6] = |c00ff8000 Set Joueur_Couleur[7] = |c0000ff00 Set Joueur_Couleur[8] = |c00ff00ff
Secret:
Gui:
Trigger:
Icone
Evénements
Map initialization
Conditions
Actions
Set Icone_Uniter[3] = Baron Infernal Set Icone_icone[3] = ReplaceableTexturesCommandButtonsBTNFelGuardBlue.blp
Cela reste encore relativement la même chose que dans le tuto proposé sur le forum. Et justement, c'est ça qui m'embête ... je n'ai fait que recopier les fichiers de sa map avec les variables, mais sa marche pas ...
Si une âme généreuse et intelligente voudrait bien me dire d'où vient le problème je lui en serait reconnaissant !!
ps : au passage, les icones des héros ne s'affiche pas, quelqu'un sait pourquoi ? _________________
Salut,
Déjà, sache que, pour t'éviter des faire plein de fonctions : quand tu met en n° de ligne (ou de colonne) 0, ça compte toutes les lignes et colonnes.
Exemples : Set display style [....] column 0 and row 0 to [...] masquer icônes.
Ça t'évite pas mal de For each integer.
En plus tu as fait 4 colonnes alors que toi 3 suffisent puisque les icône se placent avant le texte. Si tu veux les séparer, utilise ta bonne vielle touche "espace"
Dans ton trigger Unites tuees, tu marques dans ton action multiboard, à la colonne du mec qui possède l'unité qui a tué l'autre, alors que c'est son n° + 1. Et dans ton déclos unités mortes tu as la même erreur. En plus au lieu de créer 2 triggers pour les unités tués/mortes tu peux faire un seul déclos. Pareil pour ton déclos joueur quitte et on déclos héros icône. _________________
Inscrit le: 09 Nov 2008 Messages: 58 Sujets: 8 Spécialité en worldedit: création d'unité, declencheurs
Posté le: 17/11/08 19:04 Sujet du message:
ok merci de ta réponse. par contre désolé de te demander sa, mais plus explicitement sa donnerai quoi ? parce que la j'ai beau changer sa marche pas (j'ai du faire une erreur en replaçant tout :/)
je voudrais juste la forme texte de la ligne GUI que je dois changer (pour le unité tuer et unité morte.
je suis pas du tout calé en multitable, c'est la première que je fait alors je sais pas trop comment sa marche encore.
EDIT : et pour ce multi table, je l'ai pris sur le fofo, et j'ai pas encore trop modifier. tout cela je le sais mais je voulais d'abord essayer quelques améliorations ^^" manque de bol et de pratique sa marche pas :/ _________________
C'est car les autres joueurs sont des ordinateurs et que dans mon tuto c'est pris pour les joueurs
Groupe joueur - Pick every player in (All players matching ((((Matching player) slot status) Egal à Joue) and (((Matching player) controller) Egal à Utilisateur))) and do (Actions)
c'est dans cette ligne que sa pose le probléme. _________________
Ah oui désolé j'avais pas vu quelque chose : ta variable Multiboard_ligne_joueur et ta variable liste. Elles sont complètement inutiles :
Gui:
Trigger:
Test Evénements Conditions
Actions
-------- Code de ton trigger "Creation copier" juste avant le set list = 2 -------- -------- J'ai fais les codes avec une multitable à 3 colonnes. -------- -------- Celui-ci est absent --------
For each (Integer A) from 1 to Nombre_joueurs, do (Actions)
Boucle - Actions
Multitable - Set the text for Multitable item in column 1, row ((Integer A) + 1) to (Joueur_couleur[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) Multitable - Set the text for Multitable item in column 2, row ((Integer A) + 1) to 0 Multitable - Set the text for Multitable item in column 3, row ((Integer A) + 1) to 0 -------- Celui-ci est absent --------
Multitable - Montrer Multitable
Gui:
Trigger:
Test 2 Evénements Conditions
Actions
-------- Code de ton trigger "Unites tuees" -------- Set unites_tuees[(Player number of (Owner of (Killing unit)))] = (unites_tuees[(Player number of (Owner of (Killing unit)))] + 1) Multitable - Set the text for Multitable item in column 2, row ((Player number of (Owner of (Killing unit))) + 1) to (String(unites_tuees[(Player number of (Owner of (Killing unit)))])) -------- Code de ton trigger "Unites morte", j'ai mis ces 2 trigger ensemble -------- Set unite_mortes[(Player number of (Owner of (Triggering unit)))] = (unite_mortes[(Player number of (Owner of (Triggering unit)))] + 1) Multitable - Set the text for Multitable item in column 3, row ((Player number of (Owner of (Killing unit))) + 1) to (String(unite_mortes[(Player number of (Owner of (Triggering unit)))]))
J'espère que tu as compris comment ça marchait sinon demande mais précisément sinon on sait pas quoi te répondre. _________________
Inscrit le: 09 Nov 2008 Messages: 58 Sujets: 8 Spécialité en worldedit: création d'unité, declencheurs
Posté le: 17/11/08 20:08 Sujet du message:
D4RKN30V a écrit:
ok merci beaucoup je vais tester tout sa !
désolé pour la question je pensais qu'elle était bien formulé
Arf sa marche toujours pas :/
je dois pas être dans un bon jour moi
je file ma table au cas ou ...
Gui:
Trigger:
Déclencheur sans titre 001
Evénements
Temps - Elapsed game time is 0.05 seconds
Conditions
Actions
Set Nombre_Joueur = (Number of players in (All players matching ((((Matching player) controller) Egal à Utilisateur) and (((Matching player) slot status) Egal à Joue)))) Multitable - Create a multiboard with 3 columns and (3 + Nombre_Joueur) rows, titled WarCraft Rivals 0.3A Set Multitable = (Last created multiboard) Multitable - Set the text for (Last created multiboard) item in column 1, row 1 to Joueurs : Multitable - Set the text for (Last created multiboard) item in column 2, row 1 to Tués : Multitable - Set the text for (Last created multiboard) item in column 3, row 1 to Mortes :
For each (Integer A) from 1 to Nombre_Joueur, do (Actions)
Boucle - Actions
Multitable - Set the text for Multitable item in column 1, row ((Integer A) + 1) to (Joueur_Couleur[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) Multitable - Set the text for Multitable item in column 2, row (Integer A) to 0 Multitable - Set the text for Multitable item in column 3, row (Integer A) to 0
Set List = 2
Groupe joueur - Pick every player in (All players matching ((((Matching player) slot status) Egal à Joue) and (((Matching player) controller) Egal à Utilisateur))) and do (Actions)
Boucle - Actions
Set Multiboard_Ligne_Joueur[(Player number of (Picked player))] = List Multitable - Set the text for (Last created multiboard) item in column 2, row List to (Joueur_Couleur[(Player number of (Picked player))] + ((Name of (Picked player)) + |r)) Multitable - Set the text for (Last created multiboard) item in column 3, row List to 0 Multitable - Set the text for (Last created multiboard) item in column 4, row List to 0 Set List = (List + 1)
Multitable - Montrer Multitable
Gui:
Trigger:
Unites tuees
Evénements
Unité - A unit Meurt
Conditions
Actions
Set Unite_Tuer[(Player number of (Owner of (Killing unit)))] = (Unite_Tuer[(Player number of (Owner of (Killing unit)))] + 1) Multitable - Set the text for Multitable item in column 2, row ((Player number of (Owner of (Killing unit))) + 1) to (String(Unite_Tuer[(Player number of (Owner of (Killing unit)))])) Set Unite_Morte[(Player number of (Owner of (Triggering unit)))] = (Unite_Morte[(Player number of (Owner of (Triggering unit)))] + 1) Multitable - Set the text for Multitable item in column 3, row ((Player number of (Owner of (Killing unit))) + 1) to (String(Unite_Morte[(Player number of (Owner of (Triggering unit)))]))
-------- Code de ton trigger "Creation copier" juste avant le set list = 2 --------
Tu as pas fait ce que j'ai fais, tu as confondu : c'est ton Pick every players qu'il faut remplacer par le for loop integer que j'ai écrit.
Et ton pick every players, tu fais ça :
Gui:
Trigger:
Evénements Conditions
Actions
-------- [...] Autres actions -------- Multitable - Set the text for (Last created multiboard) item in column 1, row 1 to Joueurs Multitable - Set the text for (Last created multiboard) item in column 2, row 1 to Tués Multitable - Set the text for (Last created multiboard) item in column 1, row 1 to Mortes
For each (Integer A) from 1 to Nombre_joueurs, do (Actions)
Boucle - Actions
Multitable - Set the text for (Last created multiboard) item in column 1, row ((Integer A) + 1) to (Couleur_joueur[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) Multitable - Set the text for (Last created multiboard) item in column 2, row ((Integer A) + 1) to 0 Multitable - Set the text for (Last created multiboard) item in column 3, row ((Integer A) + 1) to 0
-------- [...] Autres actions --------
En plus j'ai fais une erreur dans Unites tuees :
Gui:
Trigger:
Multitable - Set the text for Multitable item in column 3, row ((Player number of (Owner of (Killing unit))) + 1) to (String(unite_mortes[(Player number of (Owner of (Triggering unit)))])) --------J'ai mis Killing unit : c'est Triggering unit--------
Inscrit le: 09 Nov 2008 Messages: 58 Sujets: 8 Spécialité en worldedit: création d'unité, declencheurs
Posté le: 17/11/08 21:37 Sujet du message:
ah oui en effet ! sa marche tout de suite mieux !
Merci infiniment ! tu m'a été d'un grand secours !
Par contre si je peut te poser une dernière petite question
Sur le MultiBoard, dans le jeu, il y'a la première ligne avec normalement écrit : Joueurs : / Tuées : / Morts :
Mais a la place de sa j'ai : Joueurs : / 0 / 0
Je remet mon declos, comme sa au passage si tu veux bien, vérifier si tout est correct. J'ai tester pour les kills c'est bon, sa le met la ou il faut .
Secret:
Gui:
Trigger:
Creation MB
Evénements
Temps - Elapsed game time is 0.50 seconds
Conditions
Actions
Set Nombre_Joueur = (Number of players in (All players matching ((((Matching player) controller) Egal à Utilisateur) and (((Matching player) slot status) Egal à Joue)))) Multitable - Create a multiboard with 3 columns and (3 + Nombre_Joueur) rows, titled oO° WarCraft Rival... Set Multitable = (Last created multiboard) Multitable - Set the text for (Last created multiboard) item in column 1, row 1 to Joueurs : Multitable - Set the text for (Last created multiboard) item in column 2, row 1 to Tués : Multitable - Set the text for (Last created multiboard) item in column 3, row 1 to Morts :
For each (Integer A) from 1 to (3 + Nombre_Joueur), do (Actions)
Boucle - Actions
Multitable - Set the display style for (Last created multiboard) item in column 1, row 1 to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Montrer text and Masquer icons Multitable - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Montrer text and Masquer icons Multitable - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 9.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 6.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 6.00% of the total screen width
Set List = 2
For each (Integer A) from 1 to Nombre_Joueur, do (Actions)
Boucle - Actions
Multitable - Set the text for Multitable item in column 1, row ((Integer A) + 1) to (Joueur_Couleur[(Integer A)] + ((Name of (Player((Integer A)))) + |r)) Multitable - Set the text for Multitable item in column 2, row (Integer A) to 0 Multitable - Set the text for Multitable item in column 3, row (Integer A) to 0
Multitable - Montrer Multitable
Ps : J'ai refait depuis le début parce que mes declos ne ressemblait plus a rien ... donc j'ai peut etre oublier d'enlever une ligne je sais pas ...
Et encore une fois, merci ! et désolé d'avoir abusé de ton temps _________________
Re, ton code n'est pas très propre :
# Ton premier for each integer est complètement inutile, remplace les Integer A par 0 (dans une multitable, 0 correspond à TOUTES les lignes/colonnes). Dans ton cas, ta première action de ce for each integer est bizarre : tu aurais pu la mettre en dehors. Mais bon le mieux est que tu remplace ton premier for each integer par ça :
Gui:
Trigger:
Set the display style for (Last created multiboard) item in column 0, row 0 to Montrer text and Masquer icons Multitable - Set the width for (Last created multiboard) item in column 1, row 0 to 9.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 2, row 0 to 6.00% of the total screen width Multitable - Set the width for (Last created multiboard) item in column 3, row 0 to 6.00% of the total screen width
# Il y a un [Set list = 2], il sert à rien
# Dans ton second for each integer : tes 2 dernières actions tu as mis en lignes, integer A alors que c'est (Integer A + 1), il y a la ligne [joueurs, tues, mortes].
Voila, j'espère que ca marche enfin . _________________
J'ai copier coller sur ton message, ça a fait un bug d'affichage. En gros, remplace le X= par l'icône de multitable et c'est bon : c'est une action multitable.
Pour les icônes je crois que tu avais mis Integer A au lieu de (Integer A + 1), regarde. Si c'est pas ça post ton trigger. _________________
Inscrit le: 09 Nov 2008 Messages: 58 Sujets: 8 Spécialité en worldedit: création d'unité, declencheurs
Posté le: 17/11/08 22:42 Sujet du message:
y'a beaucoup de Integer A, alors a moins que je fasse une bétise, je te laisse me dire c'est lequel ^^".
Pour la ligne, ok c'est pour sa alors, je vais voir sa de suite !
Gui:
Trigger:
Hero icone
Evénements
Unité - A unit enters (Playable map area)
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Unit-type of (Triggering unit)) Egal à Icone_Uniter[(Integer A)]
Alors - Actions
Multitable - Set the display style for (Last created multiboard) item in column 1, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Triggering unit)))] to Montrer text and Montrer icons Multitable - Set the icon for Multitable item in column 1, row Multiboard_Ligne_Joueur[(Player number of (Owner of (Triggering unit)))] to Icone_icone[(Integer A)]
Sinon - Actions
Gui:
Trigger:
Icone
Evénements
Map initialization
Conditions
Actions
Set Icone_Uniter[1] = Baron Infernal Set Icone_icone[1] = ReplaceableTexturesCommandButtonsBTNFelGuardBlue.blp
Dans les actions de ta multitable, tu as utilisé ta variable Multiboard_ligne_joueur qui n'est plus initialisée.
Faut que tu mettes en ligne pour tes deux actions :
((Player number of (Owner of unit(Triggering unit))) + 1). _________________
Toutes les heures sont au format GMT + 1 Heure Aller à la page 1, 2Suivante
Page 1 sur 2
Vous ne pouvez pas poster de nouveaux sujets dans ce forum Vous ne pouvez pas répondre aux sujets dans ce forum Vous ne pouvez pas éditer vos messages dans ce forum Vous ne pouvez pas supprimer vos messages dans ce forum Vous ne pouvez pas voter dans les sondages de ce forum