general:astuces
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| general:astuces [2020/09/07 13:09] – [1 - Saisie de petites valeurs] lyssitz | general:astuces [2022/09/25 17:11] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 105: | Ligne 105: | ||
| En résumé, si les deux conditions de la page 1 ne sont pas respectées, | En résumé, si les deux conditions de la page 1 ne sont pas respectées, | ||
| + | NB : lorsque vous avez plusieurs booléens ou variables à modifier dans vos CE, il est vivement conseillé de les inscrire de la façon suivante : Bool[3..6]=0 ou Variable[3..6]=0. Cette solution est bien plus rapide que la modification ligne par ligne.\\ | ||
| + | __/!\ Cela ne fonctionne que pour les CE et pas pour les CD /!\__ | ||
| ===== 5. Utilisation tolérée de Serveur[] uniques ===== | ===== 5. Utilisation tolérée de Serveur[] uniques ===== | ||
| Dans la majeure partie des cas, vous pourrez vous débrouiller avec des [[var_char: | Dans la majeure partie des cas, vous pourrez vous débrouiller avec des [[var_char: | ||
| Ligne 303: | Ligne 305: | ||
| Condition(' | Condition(' | ||
| Message(' | Message(' | ||
| - | // On peut remplacer " | + | // On peut remplacer " |
| - | // Au delà : Bugs. | + | // Au-delà : bugs |
| %String1%= | %String1%= | ||
| Variable[0]=0 | Variable[0]=0 | ||
| Ligne 328: | Ligne 330: | ||
| %Name%!=Ophio | %Name%!=Ophio | ||
| %Groupe%!=Slayers | %Groupe%!=Slayers | ||
| - | //ici je met à chaque fois des " | + | // Ici je met à chaque fois des " |
| </ | </ | ||
| </td> | </td> | ||
| Ligne 350: | Ligne 352: | ||
| < | < | ||
| Appuie sur bouton | Appuie sur bouton | ||
| - | //dans ce cas-ci au moins une restriction n'est pas respectée, le joueur peut donc se téléporter | + | // Dans ce cas-ci au moins une restriction n'est pas respectée, le joueur peut donc se téléporter |
| </ | </ | ||
| </td> | </td> | ||
| Ligne 395: | Ligne 397: | ||
| -> (50/3)+5 = 21\\ | -> (50/3)+5 = 21\\ | ||
| -> 21/10=2 | -> 21/10=2 | ||
| + | |||
| + | ===== 10. Comptage d' | ||
| + | |||
| + | Il n'est pas possible de connaitre combien d' | ||
| + | |||
| + | Nous allons utiliser une astuce qui consiste à retirer le potentiel maximum de possession de l' | ||
| + | |||
| + | Attention néanmoins : ce code ne fonctionne pas sur l' | ||
| + | |||
| + | __Exemple d' | ||
| + | < | ||
| + | <tr height=25>< | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | Appuie sur bouton | ||
| + | </ | ||
| + | </td> | ||
| + | <td width=20> | ||
| + | </td> | ||
| + | <td> | ||
| + | < | ||
| + | //étape 1 : nombre total d'item avant | ||
| + | Variable[13]=%NbObjetInventaire% | ||
| + | DelObject(Dague, | ||
| + | //étape 2 : nombre total d'item après | ||
| + | Variable[14]=%NbObjetInventaire% | ||
| + | //étape 3 : la différence donne la quantité de dague | ||
| + | Variable[15]=Variable[13]-Variable[14] | ||
| + | //étape 4 : on redonne les dagues | ||
| + | //attention : ne fonctionne que le serveur réel | ||
| + | AddObject(Dague, | ||
| + | // | ||
| + | // on peut utiliser la quantité ensuite | ||
| + | Message(' | ||
| + | // fin : réinitialisation des variables | ||
| + | Variable[13..15]=0 | ||
| + | </ | ||
| + | </td> | ||
| + | </tr> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | __Réécriture de l' | ||
| + | < | ||
| + | <tr height=25>< | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | Appuie sur bouton | ||
| + | </ | ||
| + | </td> | ||
| + | <td width=20> | ||
| + | </td> | ||
| + | <td> | ||
| + | < | ||
| + | //étape 1 : nombre total d'item avant | ||
| + | Variable[13]=%NbObjetInventaire% | ||
| + | DelObject(Dague, | ||
| + | //étape 2 : nombre total d'item après | ||
| + | Variable[14]=%NbObjetInventaire% | ||
| + | //étape 3 : la différence donne la quantité de dague | ||
| + | Variable[15]=Variable[13]-Variable[14] | ||
| + | //étape 4 : on redonne les dagues | ||
| + | // ne fonctionne que sur le serveur REEL | ||
| + | // | ||
| + | // substitut pour tester sur votre éditeur light | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | Condition(' | ||
| + | AddObject(Dague, | ||
| + | // | ||
| + | Condition(' | ||
| + | // | ||
| + | // | ||
| + | // on peut utiliser la quantité ensuite | ||
| + | Message(' | ||
| + | // fin : réinitialisation des variables | ||
| + | Variable[13..15]=0 | ||
| + | |||
| + | </ | ||
| + | </td> | ||
| + | </tr> | ||
| + | </ | ||
| + | </ | ||
general/astuces.1599484169.txt.gz · Dernière modification : 2022/09/25 17:09 (modification externe)