World of Gothic Archiv > Editing
Gunthers Schwert
Seite 1 von 1  1 
14.04.2004, 14:07 #1
Rolus
Beiträge: 6
Gunthers Schwert
Also ich hab ein kleines Problem bei dem Skript-Tutorial mit deisem Gunther.
Und zwar ist es folgendermaßen: Immer wenn ich es mit dem Gothicstarter sarten will kommt
die Meldung:

"U:PAR: Redefined identifier : ITMW_1H_GUNTHERWANDETSWORD ( line 1738 )"

Bezieht sich, glaub' ich, auf dieses Skript (DIA_None_999_Gunther_AskForSword.d):



instance None_999_Gunther_AskForSword (C_INFO)
{
npc = None_999_Gunther;
condition = None_999_Gunther_AskForSword_Condition;
information = None_999_Gunther_AskForSword_Info;
important = TRUE;

permanent = FALSE;

description = "";

};

FUNC int None_999_Gunther_AskForSword_Condition()
{
if (hero.level >= 0)

{
return TRUE;
};
return FALSE;
};

func void None_999_Gunther_AskForSword_Info()
{
AI_Output ( self, other, "None_999_Gunther_AskForSword_Info_8_01");


Info_ClearChoices(None_999_Gunther_AskForSword);

Info_AddChoice(None_999_Gunther_AskForSword,
"Auf jedenfall genug", None_999_Gunther_AskForSword_Yes);

Info_AddChoice(None_999_Gunther_AskForSword,
"Nichts spezielles", None_999_Gunther_AskForSword_No);
};

func void None_999_Gunther_AskForSword_Yes ()
{
AI_Output(other,self,
"None_999_Gunther_AskForSword_Info_8_02");
AI_Output(self,other,
"None_999_Gunther_AskForSword_Info_8_03");

AI_StopProcessInfos (self);
};

func void None_999_Gunther_AskForSword_No ()
{
AI_Output(other,self,"None_999_Gunther_AskForSword_Info_8_04");

AI_Output(self,other,"None_999_Gunther_AskForSword_Info_8_05");

Log_CreateTopic (GunthersSword,LOG_MISSION);
Log_SetTopicStatus (GunthersSword,LOG_RUNNING);
B_LogEntry(GunthersSword, "Gunther hat mich gebeten sein Milhouseschwert für Ihn aufzutreiben");
AI_StopProcessInfos (self);
};
// ************************ EXIT **************************
instance None_999_Gunther_AskForSword_Exit (C_INFO)
{
npc = None_999_Gunther;
condition = None_999_Gunther_AskForSword_Exit_Condition;
information = None_999_Gunther_AskForSword_Exit_Info;
important = 0;
permanent = 1;
description = "ENDE";
};

FUNC int None_999_Gunther_AskForSword_Exit_Condition()
{
return 1;
};

FUNC VOID None_999_Gunther_AskForSword_Exit_Info()
{
AI_StopProcessInfos ( self );
};


instance None_999_Gunther_BringSword (C_INFO)
{
npc = None_999_Gunther;
condition = None_999_Gunther_bringSword_Condition;
information = None_999_Gunther_bringSword_Info;
important = FALSE;
permanent = TRUE;


description = "Hast Du das Schwert ?";
};

FUNC int None_999_Gunther_bringSword_Condition()
{

if (Npc_KnowsInfo ( hero, None_999_Gunther_AskForSword)
&! int_GotSword
&& Npc_HasItems (other, ItMw_1H_GuntherWantedSword) >= 1)
{
return TRUE;
};
return FALSE;
};

func void None_999_Gunther_bringSword_Info()
{
Info_ClearChoices (None_999_Gunther_bringSword);

Info_AddChoice (None_999_Gunther_bringSword,
"Ich hab Dein Schwert gebs dir aber nicht",
None_999_Gunther_bringSword_Yes);

Info_AddChoice (None_999_Gunther_bringSword,
"Ich hab Dein Schwert hier ist es",
None_999_Gunther_bringSword_No);
};

func void None_999_Gunther_bringSword_Yes ()
{
AI_Output( other, self, "None_999_Gunther_bringSword_Info_8_06");
AI_Output( self, other, "None_999_Gunther_bringSword_Info_8_07");

AI_StopProcessInfos (self);

AI_StartState( self, ZS_Attack, 0, "");
};

func void None_999_Gunther_bringSword_No ()
{
AI_Output ( other, self, "None_999_Gunther_bringSword_Info_8_08");
AI_Output ( self, other, "None_999_Gunther_bringSword_Info_8_09");

B_LogEntry (GunthersSword, "Ich habe Gunther sein Schwert gebracht");

other.exp = other.exp + 100;
other.lp = other.lp + 10;

//Npc_GiveItem ( other, MilhouseSchwert, self);
AI_StopProcessInfos (self);
};


Dieses Skript(ItMw_1H_GuntherWantedSword.d) könnte auch was damit zu tun haben:

INSTANCE ItMw_1H_GuntherWantedSword (C_Item)
{
name = "Milhouse´ Schwert";

mainflag = ITEM_KAT_NF;
flags = ITEM_SWD;
material = MAT_METAL;

value = 1000;

damageTotal = 300;
damagetype = DAM_EDGE;
range = 200;

cond_atr[2] = ATR_STRENGTH;
cond_value[2] = 5;
visual = "ItMw_1H_Sword_Old_01.3DS";

description = name;
TEXT[2] = "Damage"; COUNT[2] = 300;
TEXT[3] = "Benötigte Stärke"; COUNT[3] = cond_value[2];
TEXT[4] = "einhand Schwert";
TEXT[5] = "Wert"; COUNT[5] = value;
};

Kann mir jemand sagen wo das Problem ist?
Ich habe eigentlich alles genau so übernommen wie es im Tutorial stand,
d.h. müsste doch eigentlich auch klappen, oder?

Schon mal vielen Dank , Rolus
14.04.2004, 14:13 #2
Neely
Beiträge: 133

Die Fehlermeldung besagt, dass die genannte Instanz mehrfach definiert wurde. Hast du das Script des Items zweimal drinstehen unter gleichem Namen?
14.04.2004, 17:24 #3
Rolus
Beiträge: 6

Ja, danke das wahr wohl das Problem.
Aber nun kommt natürlich das nächste:
"U:PAR: CONTENTSTORYMISSIONSDIA_NONE_GUNTHERASKFORSWORD.D: Unknown identifier : GUNTHERSWORD"
Das ist immer noch der alte Dialog (s.o.) und "GUNTHERSWORD" ist, soweit ich das verstanden habe, der Tagebicheintrag. Wo ist jetzt das Problem?
Wäre für dankbar für Hilfe, Rolus
14.04.2004, 18:26 #4
Maharreshi
Beiträge: 82

Hallöchen!

'GuntersSword' ist in diesem Fall eine Variable / Konstante, die den Namen des Quests enthält, der dann auch im Tagebuch angezeigt wird.
Diese Variable / Konstante muss aber eben vorher festgelegt werden und du scheinst das vergessen zu haben.;)

Schreib am besten direkt an den Anfang der 'DIA_NONE_Gunther_AskforSword.d' folgendes:

const string GuntersSword = "Gunthers Schwert";

Im Spiel wird dann im Tagebuch der Name des Quests "Gunthers Schwert" unter 'Laufende Aufträge' angezeigt, sobald der Spieler den Auftrag erhalten hat.
15.04.2004, 18:34 #5
Rolus
Beiträge: 6

Ja, richtig. Das war's wohl. Danke!
Seite 1 von 1  1