-
Notifications
You must be signed in to change notification settings - Fork 7
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
HSV properties for blocks #35
Comments
Thank you for request and research! I've add this feature to Released in v0.2.25 Usagelevel.Blocks.Add(new Block(216)
{
PositionX = 30,
PositionY = 30,
Hsv = new Hsv()
{
Brightness = 0.5f,
DeltaBrightness = true
},
AdditionalHsv = new Hsv()
{
Hue = 120,
Saturation = 0.5f
}
});
// Pay attention: block with id 1887 has only detail color, but hsv isn't additional
// AdditionalHsv used for detail color only when both color (base and detail) are present in the block
level.Blocks.Add(new Block(1887)
{
PositionX = 60,
PositionY = 30,
Hsv = new Hsv()
{
Hue = 60
}
}); As for your problem, when all the blocks change the scale to 0.20, there is probably an incorrect character written to the level string somewhere. |
From testing, for whatever reason setting the scale to 5 for the smallest pixel blocks equals a scale of 1 in the editor. I wonder if Rob is cheating here by using the same block code but with different scaling. |
Got around to testing this and this works! It definitely looks like Rob has specific handling of the scale value for these pixel blocks, as it appears to divide the scale value by 5 no matter what the input is. I also still really wonder what GameProperty 155 is. If I was more knowledgeable on reverse engineering gd I would look into it myself. |
I want to be able to set the hsv attribute of blocks when creating them for levels. I've tried implementing it myself but I can't get it quite right.
What I have identified so far is that GameProperty 43 is the hsv value, 41 means to use hsv on base (I think 42 is to use hsv on detail, havent checked). For whatever reason when I tried implementing this myself, every block's scale (even ones that arent being created by the program) just completely breaks and gets set to 0.20.
The text was updated successfully, but these errors were encountered: