To adjust the speed try changing this line "Object.SetTimer 1,10" to "Object.SetTimer 1,100" or, if still too fast try "Object.SetTimer 1,1000".
That's right. As well you may do this by changing the step of opacity increasing/reduction:
desktopx.object(item).opacity = desktopx.object(item).opacity - 25
desktopx.object(item).opacity = desktopx.object(item).opacity - 10
Can I make the Object Controller fade out as the array fades in?
To get the array to fade in you would need a second array of objects and add a line in the for loop to fade it in.
Yes, you really need the second array:
Dim objects1,objects2,fade
Sub Object_OnScriptEnter
'enter here the names of objects that you need
objects1 = Array("name1","name2","name3",.....)
objects2 = Array("name1","name2","name3",.....)
fade = "in"
End Sub
Sub Object_OnStateChange(state)
If state = "Command executed" Then
If fade = "in" Then fade = "out" Else fade = "in"
Object.SetTimer 1,10 '<== change this value as you want
End IF
End Sub
Sub Object_OnTimer1
Select Case fade
Case "out"
If desktopx.object("name1").opacity > 0 Then
For Each item In objects1
desktopx.object(item).opacity = desktopx.object(item).opacity - 1 '<== change this....
Next
For Each item In objects2
desktopx.object(item).opacity = desktopx.object(item).opacity + 1 '<== and this!!!!!...
Next 'the steps must be equal!!!!
Else
Object.KillTimer 1
For Each item In objects1
desktopx.object(item).opacity = 0
Next
For Each item In objects2
desktopx.object(item).opacity = 100
Next
End If
Case "in"
If desktopx.object("name1").opacity < 100 Then
For Each item In objects1
desktopx.object(item).opacity = desktopx.object(item).opacity + 1
Next
For Each item In objects2
desktopx.object(item).opacity = desktopx.object(item).opacity - 1
Next
Else
Object.KillTimer 1
For Each item In objects1
desktopx.object(item).opacity = 100
Next
For Each item In objects1
desktopx.object(item).opacity = 0
Next
End If
End Select
End Sub