deratiseur Clown triste
Nombre de messages : 722 Age : 47 Localisation : GAP, Hautes alpes. Date d'inscription : 06/07/2008
| Sujet: Proposer un dialogue d'entrée à plusieur peronnages Dim 7 Mar 2010 - 21:33 | |
| Je bosse sur le chantelame, pour l'adapter aux 6 joueurs, pas seulement au premier. Un script ajouté à baldur.bcs et baldur25.bcs propose un dialogue au joueur 1 s'il rempli les conditions, et le même dialogue au joueur 2 s'il rempli les conditions. Ce sont les même dialogue, mais avec des variables d'entrée et de sortie différentes pour qu'il n'y ai pas de confusion. Le script est celui-ci : - Spoiler:
IF OR(2) Alignment(Player1,LAWFUL_GOOD) Alignment(Player1,LAWFUL_NEUTRAL) CheckStatGT(Player1,12,STR) CheckStatGT(Player1,12,CON) CheckStatGT(Player1,14,DEX) CheckStatGT(Player1,14,INT) Global("pxchantel1","GLOBAL",0) Class(Player1,FIGHTER_MAGE) Race(Player1,ELF) THEN RESPONSE #100 SetGlobal("pxchantel1","GLOBAL",1) ActionOverride(Player1,Startdialog("PXCASK1",Myself)) END
IF OR(2) Alignment(Player2,LAWFUL_GOOD) Alignment(Player2,LAWFUL_NEUTRAL) CheckStatGT(Player2,12,STR) CheckStatGT(Player2,12,CON) CheckStatGT(Player2,14,DEX) CheckStatGT(Player2,14,INT) Global("pxchantel2","GLOBAL",0) Class(Player2,FIGHTER_MAGE) Race(Player2,ELF) THEN RESPONSE #100 SetGlobal("pxchantel2","GLOBAL",1) ActionOverride(Player2,Startdialog("PXCASK2",Myself)) END
Et les dialogues ceux-ci : - Spoiler:
BEGIN PXCASK1
IF ~Global("pxchantel1","GLOBAL",1)~ Doit SAY @88 IF ~~ THEN REPLY @89 GOTO Oui IF ~~ THEN REPLY @810 GOTO Non END
IF ~~ Oui SAY @811 IF ~~ THEN REPLY @812 GOTO Batard IF ~~ THEN REPLY @813 GOTO Longue IF ~~ THEN REPLY @814 GOTO Katana IF ~~ THEN REPLY @815 GOTO Scimet END
IF ~~ Non SAY ~~ IF ~~ THEN DO ~SetGlobal("pxchantel1","GLOBAL",-1)~ EXIT END
IF ~~ Batard SAY @816 IF ~~ THEN DO ~SetGlobal("pxcbatar","LOCALS",1) SetGlobal("pxchantel1","GLOBAL",2) ActionOverride(Player1, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Longue SAY @816 IF ~~ THEN DO ~SetGlobal("pxclongu","LOCALS",1) SetGlobal("pxchantel1","GLOBAL",2) ActionOverride(Player1, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Katana SAY @816 IF ~~ THEN DO ~SetGlobal("pxckatan","LOCALS",1) SetGlobal("pxchantel1","GLOBAL",2) ActionOverride(Player1, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Scimet SAY @816 IF ~~ THEN DO ~SetGlobal("pxcscime","LOCALS",1) SetGlobal("pxchantel1","GLOBAL",2) ActionOverride(Player1, AddKit(PXCHANTELAME))~ EXIT END
- Spoiler:
BEGIN PXCASK2
IF ~Global("pxchantel2","GLOBAL",1)~ Doit SAY @88 IF ~~ THEN REPLY @89 GOTO Oui IF ~~ THEN REPLY @810 GOTO Non END
IF ~~ Oui SAY @811 IF ~~ THEN REPLY @812 GOTO Batard IF ~~ THEN REPLY @813 GOTO Longue IF ~~ THEN REPLY @814 GOTO Katana IF ~~ THEN REPLY @815 GOTO Scimet END
IF ~~ Non SAY ~~ IF ~~ THEN DO ~SetGlobal("pxchantel2","GLOBAL",-1)~ EXIT END
IF ~~ Batard SAY @816 IF ~~ THEN DO ~SetGlobal("pxcbatar","LOCALS",1) SetGlobal("pxchantel2","GLOBAL",2) ActionOverride(Player2, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Longue SAY @816 IF ~~ THEN DO ~SetGlobal("pxclongu","LOCALS",1) SetGlobal("pxchantel2","GLOBAL",2) ActionOverride(Player2, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Katana SAY @816 IF ~~ THEN DO ~SetGlobal("pxckatan","LOCALS",1) SetGlobal("pxchantel2","GLOBAL",2) ActionOverride(Player2, AddKit(PXCHANTELAME))~ EXIT END
IF ~~ Scimet SAY @816 IF ~~ THEN DO ~SetGlobal("pxcscime","LOCALS",1) SetGlobal("pxchantel2","GLOBAL",2) ActionOverride(Player2, AddKit(PXCHANTELAME))~ EXIT END
Lorsque je crée une partie en multijoueur avec 2 personnages remplissant les conditions, le dialogue d'intro n'est à chaque fois proposé qu'à un seul des deux, aléatoirement, player 1 ou 2. pourquoi, svp ? Svp, comment faire apparaitre les 2 dialogues, l'un à la suite de l'autre ? | |
|
Zranoff Prétendant Cargoliste
Nombre de messages : 147 Age : 33 Localisation : Arles Date d'inscription : 14/02/2009
| Sujet: Re: Proposer un dialogue d'entrée à plusieur peronnages Jeu 11 Mar 2010 - 17:07 | |
| Il ne semble pas y avoir d'erreurs de code, je pense que le premier script à s'appliquer fait passer le jeu en mode dialogue ce qui a pour effet d'empêcher l'apparition du 2e dialogue mais n'empêche pas à la variable du 2e bloc (pour le 2e perso) d'être mise à 1 | |
|