Der_W@ldmeister
Freund des Hauses
Wenn du es mit ScriptEffectStart machst, muss das Script auf die Verzauberung und nicht aufden Trank! Hast du das so gemacht?
Scn AAAMusikwürfelScript
Short Choosing
Short Choice
Short Choice2
Short MusicChoice
Short MusicChoice2
Float Timer
Begin onActivate player
set timer to 0
if Choosing == 0
set Choosing to -1
endif
end
Begin onEquip player
set timer to 0
if Choosing == 0
set Choosing to -3
endif
end
Begin gameMode
If (Choosing == -1)
MessageBox "Was möchtet ihr tun?", "Nehmen", "Musik auswählen", "Fertig"
set Choosing to 1
set Choice to GetButtonPressed
elseif (Choosing == 1)
if (Choice == -1)
set Choice to GetButtonPressed
elseif (Choice == 0)
Activate
Set Choosing to 0
elseif (Choice == 1)
Set Choosing to -2
elseif (Choice == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -2)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 2
set MusicChoice to GetButtonPressed
elseif (Choosing == 2)
if (MusicChoice == -1)
set MusicChoice to GetButtonPressed
elseif (MusicChoice == 0)
if Timer <= 0
set Timer to 141 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -1
elseif (MusicChoice == 1)
if Timer <= 0
set Timer to 161 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -1
elseif (MusicChoice == 2)
if Timer <= 0
set Timer to 189 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -1
elseif (MusicChoice == 3)
if Timer <= 0
set Timer to 156 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -1
elseif (MusicChoice == 4)
if Timer <= 0
set Timer to 136 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -1
elseif (MusicChoice == 5)
Set Choosing to -1
elseif (MusicChoice == 6)
Set Choosing to 0
endif
Endif
End
Begin menuMode
If (Choosing == -3)
MessageBox "Was möchtet ihr tun?", "Ablegen", "Musik wählen", "Fertig"
set timer to 0
set Choosing to 3
set Choice2 to GetButtonPressed
elseif (Choosing == 3)
if (Choice2 == -1)
set Choice2 to GetButtonPressed
elseif (Choice2 == 0)
DropMe
Set Choosing to 0
elseif (Choice2 == 1)
Set Choosing to -4
elseif (Choice2 == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -4)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 4
set MusicChoice2 to GetButtonPressed
elseif (Choosing == 4)
if (MusicChoice2 == -1)
set MusicChoice2 to GetButtonPressed
elseif (MusicChoice2 == 0)
if Timer <= 0
set Timer to 141 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -3
elseif (MusicChoice2 == 1)
if Timer <= 0
set Timer to 161 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -3
elseif (MusicChoice2 == 2)
if Timer <= 0
set Timer to 189 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -3
elseif (MusicChoice2 == 3)
if Timer <= 0
set Timer to 156 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -3
elseif (MusicChoice2 == 4)
if Timer <= 0
set Timer to 136 ; Länge der Musik in Sekunden
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
else
set Timer to Timer - getSecondsPassed
endif
Set Choosing to -3
elseif (MusicChoice2 == 5)
Set Choosing to -3
elseif (MusicChoice2 == 6)
Set Choosing to 0
endif
Endif
End
if closed==1
messagebox"tor bleibt zu!"
endif
scn name
short once
begin ontrigger player
if once==0
TOR-REF.playgroup backward 0
set TOR-REF.closed to 1
set once to 1
endif
end
Steht auf dem CS-Wiki:
To use this command in a cell with music-type "Default", you need to call StreamMusic random first, then wait for a frame for the command to be executed, and then use Streammusic "<filename>".
Trifft das zu?
Scn AAAMusikWürfelScript
Short Choosing
Short Choice
Short Choice2
Short MusicChoice
Short MusicChoice2
Begin onActivate player
if Choosing == 0
set Choosing to -1
endif
end
Begin onEquip player
if Choosing == 0
set Choosing to -3
endif
end
Begin gameMode
If (Choosing == -1)
MessageBox "Was möchtet ihr tun?", "Nehmen", "Musik auswählen", "Fertig"
set Choosing to 1
set Choice to GetButtonPressed
elseif (Choosing == 1)
if (Choice == -1)
set Choice to GetButtonPressed
elseif (Choice == 0)
Activate
Set Choosing to 0
elseif (Choice == 1)
Set Choosing to -2
elseif (Choice == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -2)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 2
set MusicChoice to GetButtonPressed
elseif (Choosing == 2)
if (MusicChoice == -1)
set MusicChoice to GetButtonPressed
elseif (MusicChoice == 0)
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
Set Choosing to -1
elseif (MusicChoice == 1)
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
Set Choosing to -1
elseif (MusicChoice == 2)
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
Set Choosing to -1
elseif (MusicChoice == 3)
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
Set Choosing to -1
elseif (MusicChoice == 4)
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
Set Choosing to -1
elseif (MusicChoice == 5)
Set Choosing to -1
elseif (MusicChoice == 6)
Set Choosing to 0
endif
Endif
End
Begin menuMode
If (Choosing == -3)
MessageBox "Was möchtet ihr tun?", "Ablegen", "Musik wählen", "Fertig"
set Choosing to 3
set Choice2 to GetButtonPressed
elseif (Choosing == 3)
if (Choice2 == -1)
set Choice2 to GetButtonPressed
elseif (Choice2 == 0)
DropMe
Set Choosing to 0
elseif (Choice2 == 1)
Set Choosing to -4
elseif (Choice2 == 2)
Set Choosing to 0
endif
Endif
If (Choosing == -4)
MessageBox "Welche Musik möchtet ihr hören?", "Lied 1", "Lied 2", "Lied 3", "Lied 4", "Lied 5", "Zurück", "Abbrechen"
set Choosing to 4
set MusicChoice2 to GetButtonPressed
elseif (Choosing == 4)
if (MusicChoice2 == -1)
set MusicChoice2 to GetButtonPressed
elseif (MusicChoice2 == 0)
StreamMusic "Data\Music\Eydis\Lied_1.mp3"
Set Choosing to -3
elseif (MusicChoice2 == 1)
StreamMusic "Data\Music\Eydis\Lied_2.mp3"
Set Choosing to -3
elseif (MusicChoice2 == 2)
StreamMusic "Data\Music\Eydis\Lied_3.mp3"
Set Choosing to -3
elseif (MusicChoice2 == 3)
StreamMusic "Data\Music\Eydis\Lied_4.mp3"
Set Choosing to -3
elseif (MusicChoice2 == 4)
StreamMusic "Data\Music\Eydis\Lied_5.mp3"
Set Choosing to -3
elseif (MusicChoice2 == 5)
Set Choosing to -3
elseif (MusicChoice2 == 6)
Set Choosing to 0
endif
Endif
End
scn AWDWerwolfTor01Script
short closed
short init
short open
short next
short busy
float timer
ref mySelf
ref myParent
begin onActivate
if isActionRef player == 0
if isActionRef mySelf == 0 && busy == 0
if open == 0
playgroup forward 0
set open to 1
enableLinkedPathPoints
else
playgroup backward 1
set open to 0
disableLinkedPathPoints
endif
set next to 1
set busy to 1
set timer to 1
endif
else
if closed==1
messagebox"Du kommst hier net rein!"
endif
end
begin gameMode
if init == 0
; set up ref vars
set mySelf to getSelf
set myParent to getParentRef
; prepare linked pathsgrid points
disableLinkedPathPoints
set init to 1
endif
; daisy-chain activation
if next == 1 && timer <=0
set next to 0
myParent.activate mySelf 1
endif
if isAnimPlaying == 0 && busy == 1
set busy to 0
endif
if timer > 0
set timer to timer - getSecondsPassed
endif
end
begin onReset
reset3DState
set open to 0
set next to 0
set busy to 0
disableLinkedPathPoints
end