Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
ShadowHunter wrote:Hi,
The timed event is not the best solution as the timer in AM is far from perfect... it varies per computer and workload... so don't use it for the lenght of the clip...
CBSection31 wrote:So I've created a sub with all the required code to randomly choose what videos to play and in what order. The problem is, predictably, that - when I call the sub - only the last video in the sub plays, because the code doesn't pause until each video completes.
Sub Puzzle
PlayVideo GetPath(2) + "Puzzlestart.avi", 0, 0, 1024, 768, False
' Need to add delay code here!
Pos1=1
Pos2=2
Pos3=3
Times=0
randomize
ChosenNum=int(rnd*(3))+1
randomize
Movement=int(rnd*(3))+1
Do Until Times = 5
If Movement=1 Then
PosTemp=Pos1
Pos1=Pos2
Pos2=PosTemp
PlayVideo GetPath(2) + "puzzleswitch1and2.avi", 0, 0, 1024, 768, False
End If
If Movement=2 Then
PosTemp=Pos2
Pos2=Pos3
Pos3=PosTemp
PlayVideo GetPath(2) + "puzzleswitch2and3.avi", 0, 0, 1024, 768, False
End If
If Movement=3 Then
PosTemp=Pos1
Pos1=Pos3
Pos3=PosTemp
PlayVideo GetPath(2) + "puzzleswitch1and3.avi", 0, 0, 1024, 768, False
End If
' Need to add delay code here!
Times=Times+1
Loop
PlayVideo GetPath(2) + "puzzleend.avi", 0, 0, 1024, 768, False
' Need to add delay code here!
Action.GoToFrame "PuzzleEnd"
End Sub
Return to Adventure Maker General Discussion
Users browsing this forum: No registered users and 0 guests