Big list of missing script properties

Started by Crimson Wizard, Wed 18/01/2017 15:10:00

Previous topic - Next topic

Cassiebsg

No way to change the settings of a Text Window GUI... like TextColor. This one seems to be missed often, as there are multiple threads on the forum asking about how to change it.
There are those who believe that life here began out there...

Dave Gilbert

Just saw this thread. One property I've always wanted is the ability to do FRAME/LOOP FLIPPING! You can check IF a frame is flipped, but you can't actually SET the frame as flipped.

It would also be useful to flip an entire loop!

I'd also like a pony.

Crimson Wizard

Quote from: Dave Gilbert on Mon 29/05/2017 13:27:04
Just saw this thread. One property I've always wanted is the ability to do FRAME/LOOP FLIPPING! You can check IF a frame is flipped, but you can't actually SET the frame as flipped.

It would also be useful to flip an entire loop!

You mean, during the game?
BTW, I think that's possible to do now by replacing frames with DynamicSprites, which you create from original and flip, then assign to the view frame.

Dave Gilbert

#23
True! But the advantage of being able to change the property via script is that you can use it to determine IF the frame is already flipped.

Currently you can use: "if (frame.Flipped == true)" to determine if the frame was flipped via the editor, but if you change the frame with a DynamicSprite you won't be able to do that. Ideally, I'd like to be able to do this:

if (frame.Flipped == false)
{
    frame.Flipped=true;
}

Meaning I can check if the frame is already flipped, and if not - flip it!

Radiant

Oddly, the baseline of a walkbehind can be written to in script, but not read.

Monsieur OUXX


PropertyTypeCommentStatus
File
f.NameString, readonlyThe name of the file
File.GetFolder(String path)static String, readonly"Renders" a path containing $APPDATADIR$ to its actual value (is there another way?)
AudioClip
ID or Nameint, readonly or String, readonlysome way to identify what AudioClip this is when iterating on AudioClips
AudioChannel
PreferredTypeAudioType, readonlyThe Audiotype it will play in priority, or some way to predict what will play what, in regards to the discussion here
 

Crimson Wizard

@Monsieur OUXX, File.GetFolder may be a useful addition, but that's rather not a "missing property" in the sense this thread was created for.

Regarding AudioChannel.PreferredType - frankly I'd rather suggest redesigning of how channels work, because now it looks like you are trying to find a way to "hack the system".

Monsieur OUXX

Quote from: Crimson Wizard on Fri 29/09/2017 13:28:51
frankly I'd rather suggest redesigning of how channels work, because now it looks like you are trying to find a way to "hack the system".

Well I was just trying to suggest a property that would be easily read straight out of the engine, with "not too much" additional work. I'm totally in favor of getting rid of those hidden priority rules indeed.
Indeed I misunderstood the thread -- apologies for posting.
 

Dave Gilbert

The ability to get and set the inventory x & y hotspot via the script would be handy!

Gurok

"UseRoomAreaLighting" is settable on an object in the editor, but there is no matching property at runtime.

"UseRoomAreaScaling" has Object.IgnoreScaling at runtime. Not ideal, but it might be an idea to make the new property match this convention.
[img]http://7d4iqnx.gif;rWRLUuw.gi

morganw

Quote from: Monsieur OUXX on Fri 29/09/2017 13:09:18

PropertyTypeCommentStatus
AudioClip
ID or Nameint, readonly or String, readonlysome way to identify what AudioClip this is when iterating on AudioClips

The missing name and non-visible ID does make it pretty difficult to randomly select an AudioClip. I thought that I could workaround this by checking the hex value that is used as the filename for the audio cache, but it seems this number doesn't match the ID value.

Crimson Wizard

Quote from: morganw on Sat 12/05/2018 12:39:05
The missing name and non-visible ID does make it pretty difficult to randomly select an AudioClip. I thought that I could workaround this by checking the hex value that is used as the filename for the audio cache, but it seems this number doesn't match the ID value.

True, and as many other object IDs it cannot be set by user. Unreliable AudioClip.ID situation was discussed in another thread, regarding new audio system.

The only solution currently is to create custom arrays of AudioClip pointers in script, fill them in proper order and random pick from them.

morganw

I wasn't sure what the overhead of creating the array was (I was looking to run this entirely in a script module, and so have no state to permanently store an array), so in the end I've defined case statements in a macro (all on one line), where each case returns an AudioClip. This seems to workaround it (when I import another AudioClip, I also add a case that returns it, and I just generate a random number to randomly get one).

Crimson Wizard

#33
Quote from: morganw on Sat 12/05/2018 15:33:25
I wasn't sure what the overhead of creating the array was (I was looking to run this entirely in a script module, and so have no state to permanently store an array)

Hmm... imho unless you have an array of many thousands entries, there should not be an overhead. Besides, you can create dynamic array.
But then, maybe I do not understand your case well enough.

Anyway, this does not deny the fact that script API is imperfect.

Snarky


eri0o


Slasher

I would just like to say this:

Anything we can change in script that avoids us having to play through the whole game from the start is a big plus from me  (nod)

eri0o

#37
I noticed there is no way to invoke a ListBox.OnSelectionChanged event. Also it appears changing selection of a list box by code doesn't invoke ListBox.OnSelectionChanged.

I also noticed it's not possible to figure out if a Slider is vertical or horizontal. Apparently If Slider.Height < Slider.Width, it's horizontal. Sliders are also missing a way to check if sliderChanged

cat

Quote from: eri0o on Sun 10/03/2019 15:28:19
Object.Scaling

This. Also setting manual scaling for objects would VERY useful.

Slasher

Quote from: cat on Sun 11/08/2019 11:06:51
Quote from: eri0o on Sun 10/03/2019 15:28:19
Object.Scaling

This. Also setting manual scaling for objects would VERY useful.

Actually WYSIWYG would be positively fantabulosa  (laugh)

SMF spam blocked by CleanTalk