-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linked sprite support, custom MovingSprite
light sprites
#2753
base: master
Are you sure you want to change the base?
Conversation
Objects which utilize more than 1 sprite now get the files of their additional sprites from the main one's "linked-sprites" list. This allows for expanded sprite customization for objects.
Custom lightsprites can now be added to all objects, which inherit `MovingSprite`. Setting a custom color for the lightsprite is also possible, as long as the object is not designed to use foreign color values (for example, from an option).
[ci skip]
Do the light sprites work per action or is it one for all? |
One for all, currently. I think per-action could be done, though. |
That would be nice to have for sure |
I'm thinking it could be done by having the same block available in |
Linked sprites can now be added to sprite actions too. If a sprite with the same key is found in the general linked sprites block and the action-specific one, the sprite specified by the action will be prioritized, thus overriding the default linked sprite file.
What was this trying to fix? |
Hardcoded sprites. |
@Vankata453 My brain explodes by trying to form this words so I'll do it like this. Can I:
The way I originally was hoping we could achieve that was through a special tag within an action.
The way the tag would work is that it will check for action names within the linked sprite file (in this case |
@Rusty-Box Action-specific I modified your example, so by default it globally (for all actions) links the At the end, the modified example looks like this:
|
Wait but Dive Mine's glow never changes. Rather is disappears when it should begins playing the ticking action, as of now. Is there just no way to define that right now? I'm so confused |
As I mentioned in the beginning, it still has to be done, I just offered a way it could work. |
Okay. Good to know. I thought I was going crazy here 😅 |
May be better in terms of readability, but would be more of a pain to implement. :D (Oh, and this approach is also way more flexible, since you can also change the whole sprite, not just the action.) |
Is it just me or is it not working? I updated Dive Mine's sprite file to look like you showed in this example here but it doesn't seem to work. The light keeps disapearing when you approach Dive Mine instead of changing the action of the linked sprite. Am I doing something wrong here? |
Also the candle light doesn't seem to be rendered as a lightmap since you get a black box when you place it |
Another thing: the lit object crashes the game if you place it |
@MatusGuy Why does Dart Traps light have numbers in its linked sprite and why (when I change it) it either crashes my game or doesn't show any glowing. Is it hardcoded? It should care what I put there, should it? Since this is were you set it up to how you please when it comes to naming. It works with Dive Mine seemingly and I tried a similar naming convention. |
Custom light sprites can now be added to all objects, which inherit
MovingSprite
. Setting a custom color for the light sprite is also possible, as long as the object is not designed to use foreign color values (for example, from an option).To add a light sprite with an RGB color of
0.5, 0.2, 0.25
, in a.sprite
file:Keep in mind that specifying color values is optional. The entry can also end after specifying the file.
Additionally:
linked-sprites
list (the same block wherelight
sprites can also be added, as shown above). This allows for expanded sprite customization for objects.To add linked sprites, in a
.sprite
file:Linked sprites can be added under sprite actions, too. If a sprite with the same key is found in the general linked sprites block and the action-specific one, the sprite specified by the action will be prioritized, thus overriding the default linked sprite file.
Sprites, which the specific object does not support, will be ignored.
flip-offset
property, which determines how much the sprite should be vertically offset when flipped vertically.