Loll wrote:Is there anyway to disable a hotbox using code
Yes: Hotspot(1).Enabled = False 'be sure to replace 1 with the index of your hotspot
Loll wrote:its usually possible to use the checkboxes but the variable list gets longer. If it was possible to set/read variables of higher than value 0/1 it would be great.
Yes: Using advanced tab, you can change the variable's value to anything you want. If you want to advance the value each time the code is reached, you can increment the variable: myvar = myvar + 1
Loll wrote:I'm trying to disable a box after having dragged an object on it once
Do you still want the object to be visible?
I assume you mean dragging an inventory item to a hotspot. If so, then go to the advanced tab for this event and add the following:
- Code: Select all
'check to see if hotspot is already disabled
'if not, then disable it
if Hotspot(1).Enabled = True then
Hotspot(1).Enabled = False
end if
Loll wrote:Is it possible to use arrays I tried with no success. My programing knowledge is quite small and largely based some twenty year old basic lessons. But one of the problems I forsee is having to cope with several hundred variables.
Global arrays aren't supported, but local arrays are. To get around this, I use delimited strings and parse for the correct value. It works very similar to a single dimensional array.
example:
- Code: Select all
strPseudoArray = "value1;value2;value3:value4"
'use my subroutine to get the value you want
strVal3 = GetWord(3, strPseudoArray, ";")
'this returns the third value in the delimited string: value3
Put this code in your procedures:
- Code: Select all
Function GetWord(index,text,delimiter)
index = index - 1
aJournal = Split(text, delimiter)
If index > ubound(aJournal) then Exit Function
GetWord = ltrim(aJournal(index))
End Function
Hope that helps!