SCN Scriptname
Ref MvCMarker1REF
Ref MvCMarker2REF
Short Distance
Int i
Float fQuestDelayTime
Begin GameMode
if(i == 0)
let fquestdelaytime := 0.01
let MvCMarker1REF := MvCMarker1REF
let MvCMarker2REF := MvCMarker2REF
let i += 1
endif
if(player.isrunning)
if(player.isanimgroupplaying 7) || (player.isanimgroupplaying 8) || (player.isanimgroupplaying 9) || (player.isanimgroupplaying 10)
if(i == 1)
MvCMarker1REF.moveTo player
let i += 1
return
elseif(i == 2)
MvCMarker2REF.moveTo player
let i -= 1
endif
let distance := MvCMarker1REF.getdistance MvCMarker2REF
if(distance < 10)
player.modav2 fatigue -5000
let distance := 0
return
endif
endif
endif
End
SCN Scriptname
Ref MvCMarker1REF
Ref MvCMarker2REF
Short Distance
Int i
Float fQuestDelayTime
Begin GameMode
if(i == 0)
let fquestdelaytime := 0.01
let i := 1
endif
if(player.isrunning)
if(player.isanimgroupplaying FastForward) || (player.isanimgroupplaying FastBackward) || (player.isanimgroupplaying FastLeft) || (player.isanimgroupplaying FastRight)
if(i == 1)
MvCMarker1REF.moveTo player
let i += 1
return
elseif(i == 2)
MvCMarker2REF.moveTo player
let i -= 1
endif
let distance := MvCMarker1REF.getdistance MvCMarker2REF
if(distance < 50)
player.modav2 fatigue -5000
let distance := 0
return
endif
endif
endif
End
SCN Scriptname
Ref Marker1
Ref Marker2
Short Distance
Int i
Float fQuestDelayTime
Begin GameMode
if(i == 0)
let fquestdelaytime := 0.01
let marker1 := <Marker1Ref> ; Nur hier die Ref einsetzen!
let marker2 := <Marker2ref> ; Und hier auch.
let i += 1
endif
if(player.isrunning)
if(player.isanimgroupplaying fastforward) || (player.isanimgroupplaying fastbackward) || (player.isanimgroupplaying fastleft) || (player.isanimgroupplaying fastright)
if(i == 1)
Marker1.moveTo player
let i += 1
return
elseif(i == 2)
marker2.moveTo player
let i -= 1
endif
let distance := marker1.getdistance marker2
if(distance < 10)
player.modav2 fatigue -5000
let distance := 0
return
endif
endif
endif
End
elseif controlvar == 2
let actors := ar_construct array
let actor := getFirstRef 69 1
while actor
if actor.getIsReference player == 0 && actor.getDead
let actors[index] := actor
let index += 1
endif
let actor := getNextRef
loop
let controlvar := 3
return
elseif controlvar == 3
let index := -1
while index < ar_Last actors
let index += 1
let actor := actors[index]
actor.removeAllItems player
loop
let controlvar := 4
endif
End
printc"0"
elseif controlvar == 2
printc"1"
let actors := ar_construct array
printc"3"
let actor := getFirstRef 69 1
printc"4"
while actor
printc"5"
if actor.getIsReference player == 0 && actor.getDead
printc"6"
let actors[index] := actor
printc"7"
let index += 1
printc"8"
endif
printc"9"
getNextRef
printc"10"
loop
printc"11"
let controlvar := 3
printc"12"
return
printc"13"
elseif controlvar == 3
printc"14"
let actor := actors[index]
printc"15"
let index -= 1
printc"16"
actor.removeAllItems player
printc"17"
if index == 0
printc"18"
let controlvar := 4
printc"19"
endif
printc"20"
endif
nur die null wird angezeigt, aber wie kann den "elseif das Problem sein?
edit: Gehe ich eigentlich richtig in der Annahme, dass "tdt" und "printc" zu obse gehören?
edit: OK, ich hab die fQuestDelayTime hochgesetzt. Und controlvar wird defenitiv auf 2 gesetzt und das vor dem Absturz?
elseif controlvar == 2
let actors := ar_construct array
let actor := getFirstRef 69 1
End
Script "NAME" on carryable "ID" contains GetSelf function."
elseif controlvar == 2
let actors := ar_construct array
let actor := getFirstRef 69 1
while actor
if actor.getIsReference player == 0 && actor.getDead
let actors[index] := actor
let index += 1
endif
set actor to getNextRef
loop
let controlvar := 3
return
elseif controlvar == 3
let actor := actors[index]
let index -= 1
actor.removeAllItems player
if index == 0
let controlvar := 4
endif
endif
Ich hab's grad mal getestet (also index den Startwert 1 gegeben) und jetzt funktioniert es einwandfrei!!Aber eine Leiche bleibt unangetastet! -> ist die 0 vielleicht doch unzulässig?