Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
Sub ListDisabledHotspots
Dim Output
Output = "List of hotspots that are disabled:" + VbCrLf + VbCrLf
For Each X In WindowObject.Disappear
Output = Output + "- Hotspot #" + CStr(X.Value) + " from the frame named '" + X.Name + "'"
Next
MsgBox Output
End Sub
Sub ResetDisabledHotspots
For i = WindowObject.Disappear.Count To 1 Step -1
WindowObject.Disappear.Remove i
Next
End Sub
For Each X In WindowObject
For Y=1 to numListItems
'find the matching framename and hs
if X.Name = ListName(y) and cstr(X.Value) = ListHS(y) then
'disable this hotspot! How?
end if
Next
Next
Dim temp
temp = WindowObject.Disappear.Count
Write #1, temp
For i = 1 To temp
Write #1, Game.Disappear.Item(i).Name
Write #1, Game.Disappear.Item(i).Value
Next
ResetDisabledHotspots
Dim temp_DisappearCount
Input #1, temp_DisappearCount
Dim temp_name
Dim temp_value
For i = 1 To temp_DisappearCount
Input #1, temp_name
Input #1, temp_value
WindowObject.Disappear.Add temp_name, temp_value
Next
Write #1, Game.Disappear.Item(i).Name
Write #1, Game.Disappear.Item(i).Value
WindowObject.Disappear.Add temp_name, temp_value
WindowObject.Disappear.Add "test1", "test2"
Execute "WindowObject.Disappear.Add """+temp_name+"""," +cstr(temp_value)
sub AM_LoadHotspotState(gamecnt)
ResetDisabledHotspots
Dim temp_DisappearCount
Dim data
Dim aHotspots
Dim sFile
Dim sName
Dim nValue
sFile = "hotspotstate" & gamecnt & ".ini"
data = AM_GetAllFileContents(sFile)
aHotspots = split(data,vbcrlf) 'each array element contains a pair: <frame>,<hotspot>
lNumItems = ubound(aHotspots) - 1
For i = 0 To lNumItems
sName = CStr(trim(AM_GetWord(1,aHotspots(i),",")))
nValue = CInt(trim(AM_GetWord(2,aHotspots(i),",")))
MsgBox "set WindowObject disappear dictionary: " & sName & " / " & nValue
If not sName = "" Then
Execute "WindowObject.Disappear.Add """+sValue+"""," +CStr(nValue)
'Action.UpdateHotspotsState
Action.RefreshWindow
Else
MsgBox "Name is empty: " & sName & " / " & nValue
End If
Next
End Sub
Execute "WindowObject.Disappear.Add """+sValue+"""," +CStr(nValue)
Execute "WindowObject.Disappear.Add """+sName+"""," +CStr(nValue)
Return to Adventure Maker Technical Support and Bug Reports
Users browsing this forum: No registered users and 0 guests