All of the slices in a collection are children of a container
Code: Select all
variable(foo)
foo := load slice collection(9)
# do stuff
free slice(foo)
As for the rectangle that won't move, can I see a code example?
Moderators: Bob the Hamster, marionline, SDHawk
Code: Select all
variable(foo)
foo := load slice collection(9)
# do stuff
free slice(foo)
Code: Select all
collection:= load slice collection (1)
Box:= lookup slice (sli:box, collection)
set slice x (box, -50)Code: Select all
show value(slice x(box))
wait(10)
set slice x(box, -50)
show value(slice x(box))
Curious.Sh4d0ws wrote:No, I used the variable.
Since you can still see the menu, I don't think this is related to the fade-out-fade-in of moving from map to map.Sh4d0ws wrote:There's another problem I'm having, too: Whenever I use a door, or teleport to map 7 from map 8, the screen becomes completely black. But the menu still looks fine, and opening the map reveals that I am indeed at my target destination, and I can still move around. Prior te recently, doors worked absolutely fine. I still need to test it, but I think using the door via scripting's presenting the problem, and if I used it manually It should work fine.
That sounds pretty simple.Sh4d0ws wrote:The slice collection is just something that I want to come up when the menu does, to show you your HP and MP without you needing to go to the status screen.
It's loaded on keypress esc, to go with the menu.
While It's loaded, It doesn't do anything.
I want to free it all at once, with the close menu prompt, so that it doesn't stay there when the menu's closed.
Code: Select all
sl := load slice collection(n)
show value(sl)
# do everything else
show value(sl)
free slice(sl)
In the script that causes you to use the door from map 7 to map 8, is anything supposed to happen after the "use door" command? If so, the while loop would be preventing it from happening.The F10 screen says the only running script is the map autorun scrript. The autorun script is a while loop that I use to get the clouds scrolling across the map. The script also loads the proper palette for that map.
If the While loop is really stopping the transition, would simply walking the player to the door fix the problem?
Code: Select all
plotscript, map autorun, begin
scroll clouds
end
script, scroll clouds, begin
if(current map <> 8) then(exit script)
# do a step of cloud scrolling with no waits
set timer(5, 0, 1, @scroll clouds)
end
The "trace" command can be even more useful than the "show value" command in situations like this. Trace a string right after the "load slicde collection" command, and then check your g_debug.txt file to see how many times it happened.Sh4d0ws wrote:It's very possible that I could be loading the collection twice. It's summoned on keypress esc, and because that's what you use to close the menus, wouldn't it be opening it again?
That can't work if both handles are getting stored in the same variable. The second handle would clobber the first.Sh4d0ws wrote:... If it is, though, would it be possible to just free it twice? I did try that and it said it was already deleted.