Hallo,
hab mein script jetzt auf diesem PC.
Und hier kommt es:
Mein Aufzugscript:
scn Aufzugscript
short activated
float locx
float locy
float locz
float stopx
float stopy
float stopz
float stopxb
float stopyb
float stopzb
float speedx
float speedy
float speedz
short wayx
short wayy
short wayz
ref myself
Begin OnActivate
if activated == 0
set myself to getself
set stopx to myself.getpos x 0
set stopy to myself.getpos y 0
set stopz to myself.getpos z + 200
set stopxb to myself.getpos x
set stopyb to myself.getpos y
set stopzb to myself.getpos z
set speedx to +10
set speedy to +10
set speedz to +10
If stopx > myself.getpos x
set wayx to 1
Elseif stopx < myself.getpos x
set wayx to -1
Endif If stopy > myself.getpos y
set wayy to 1
Elseif stopy < myself.getpos y
set wayy to -1
Endif If stopz > myself.getpos z
set wayz to 1
Elseif stopz < myself.getpos z
set wayz to -1
Endif
set activated to 1
Elseif (activated == 1)
set activated to 2
Endif
End
Begin GameMode
if activated == 0
return
Elseif activated == 1
set locx to myself.getpos x + speedx
set locy to myself.getpos y + speedy
set locz to myself.getpos z + speedz
If (wayx == 1) && (locx < stopx)
myself.setpos x locx
Elseif (wayx == -1) && (locx > stopx)
myself.setpos x locx
Endif
If (wayy == 1) && (locy < stopy)
myself.setpos y locy
Elseif (wayy == -1) && (locy > stopy)
myself.setpos y locy
Endif If (wayz == 1) && (locz < stopz)
myself.setpos z locz
Elseif (wayz == -1) && (locz > stopz)
myself.setpos z locz
Endif
Elseif activated == 2
set locx to myself.getpos x - speedx
set locy to myself.getpos y - speedy
set locz to myself.getpos z - speedz
If (wayx == 1) && (locx > stopxb)
myself.setpos x locx
Elseif (wayx == -1) && (locx < stopxb)
myself.setpos x locx
Endif
If (wayy == 1) && (locy > stopyb)
myself.setpos y locy
Elseif (wayy == -1) && (locy < stopyb)
myself.setpos y locy
Endif
If (wayz == 1) && (locz > stopzb)
myself.setpos z locz
Elseif (wayz == -1) && (locz < stopzb)
myself.setpos z locz
Endif
Endif
End
Mein Schalterscript:
scn Aufzugschalter
ref par
ref myself
Begin OnActivate
set par to getparentref
set myself to getself
par.activate myself 1
End
Vielleicht findest du ja einen Fehler.