Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : Coma



Marduk
04.04.2009, 12:58
Hallo,
ich habe ein kleines Problem, ich habe ein Script erstellt, das dafür sorgt, dass ein NPC den toten Mann markiert und flachliegt. Wenn man ihn dann anspricht kommt auch der gewünschte Effekt. Somit funktioniert das Script auch ganz gut (ich habe mich dabei an Reillys Script orientiert), nur das ganze muss ich an eine Bedingung knöpfen, damit man den NPC nur an der vorgesehenen Storystelle geschieht.
Als ich die Bedingung aber einfügte(gelb markiert), kann man den NPC ganz normal ansprechen, ohne dass das Script greift.
Das verwirrt mich etwas. Muss man da noch was beachten? Oder was ist der Grund weshalb das Script nicht greift?



scn DillonKrankScript

short ComaDillon
short ButtonDillon
short CheckButtonPressDillon

Begin OnLoad
If ComaDillon == 0
SetUnconscious 1
EndIf
End

begin OnActivate
if AdriaQuest3.AdriaQuest03 == 15
If ComaDillon == 0
if ( Player.GetAv Medicine < 80 )
ShowMessage DillonLowSkillMsg
elseif ( Player.GetAv Medicine >= 80 )
Set CheckButtonPressDillon to 1
ShowMessage DillonHighSkillMsg
endif
endif
endif
else
Activate
endif

end

begin gamemode

if AdriaQuest3.AdriaQuest03 == 19
SetUnconscious 0
Set ComaDillon to 1
Set CheckButtonPressDillon to 0
endif

if CheckButtonPressDillon == 1
set ButtonDillon to GetButtonPressed

if ( ButtonDillon == 0 )
SetUnconscious 0
Set ComaDillon to 1
Set CheckButtonPressDillon to 0
Set AdriaQuest3.AdriaQuest03 to 19

endif
endif

end

SilberWolf
04.04.2009, 13:30
ich bin nicht sicher, da ich nicht gut in der Skriptsprache des Geck bin. Aber in herkömmlichen skriptsprachen gibt es verknüpfungsoperanden
in diesem fall "&&".
Wenn die im geck auch gibt als soche dann sollte das so aussehen:



if AdriaQuest3.AdriaQuest03 == 15 && ComaDillon == 0
if ( Player.GetAv Medicine < 80 )
ShowMessage DillonLowSkillMsg
elseif ( Player.GetAv Medicine >= 80 )
Set CheckButtonPressDillon to 1
ShowMessage DillonHighSkillMsg
endif
endif
else
Activate
endif


bin mir aber wie gesagt nicht sicher, da ich aus nem andern skriptbereich stamme

Marduk
04.04.2009, 13:31
Ah danke, ich probiere es aus.

Passt.