EDIT: Did I already ask about arguments? I forget. Probably because it's Ramadhan :p
(As a side note, this could also be used on the wiki to explain plotscripting a little bit (possibly))
I want to take a textbox number as an argument, turn it into a string, then put it into a text slice?
I also want to use optional arguments to change how the slice will be laid out.
I also want to be able to call and display a graphic as an argument.
Should I use pre-set arrangements and load them?
If I want to change settings (such as text outline, wrap, or have the text slice display on a rectangle) it would be much easier to do within the slice editor I feel.
I want to do something like this:
...
...
...
Code: Select all
Call:
"textslice (46, R, heroangry)"
plotscript, textslice, textbox, direction, image, begin
suspend player, suspend npcs
##(if argument direction = L,R,U,D, load the appropriate arrangement)
variable(txtbx)
txtbx := (load or create a slice or arrangement of slices)
##(I would like it if there were different arguments corresponding to the different sprite types, so they could be called and loaded simply, like "s32=small enemy 32", "h9=hero 9"
variable(img)
img := (load or create the sprite)
textbox text (string ID, 46, expand)
set slice text(txtbx, string id)
wait for key (any key)
free slice (txtbx)
free slice (img)
resume player, resume npcs
...
...
I'm not sure if this has much point, textboxes are going to be overhauled at some point, right?
Still, someone can preconfigure slices to make "textboxes" (slice collections) appear however they wish, including images for the textbox background, text colour etc.,)
I'm still a little unsure how to use arguments, so maybe if this goes well it can be added to the wiki as a plotscript teaching guide?
As a side note, I would like to be able to call a script that can transform slices, with arguments for its speed, rate, size, etc., or to have a utility script that quickly loads slices.
something like:
"plotscript, expand, target slice, final size, steps, ticks, begin"
Another idea might be a slice that clips or obscures another slice and reveals it over time, with various arguments.
"plotscript, reveal, target slice, direction, speed, begin"
Another idea might be to call a script to create a multiple choice menu of some kind. It could take the options(text) and effects(tag) as arguments.
"plotscript, options, option1, tag1, option2, tag2, etc., etc., begin"
It would probably be a pain to manage lots of slices without handles, but one might get around it by freeing all slices and reloading them to keep the correct ones displayed. Dunno.
It's not a big deal or important, I'm just curious and it could provide potential fodder for wiki tutorials re: scripting and especially slices.
These are just some vague-ish ideas. I'm far more interested in having select slices cycle through their children forward, backwards and cyclically and adding appearance/disappearance animations to various slices.
I would like if text slices could appear a letter at a time, for instance.
Sorry, rambling. Excuse me. I also didn't want to clog up the request thread. I know that animations are not planned for other than sprite slices.