This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Suggestion: GetSize() method for IObject

Here you can find ScriptAPI suggestions implemented in the game.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 27

Suggestion: GetSize() method for IObject

Post by JakSparro98 » Sun Apr 16, 2017 5:46 pm

In addition to the "GetSizeFactor" method I would suggest a "GetSize" Method to get the actual size we already see when we hover the mouse on a tile in map editor.
A possible implementation could return a Point type when the first number is the width and the second is the height.

With only GetSizeFactor we cannot always extract the correct size of the shape, this happens, for instance, when we have some tile that isn't 8x8 (eg. Sandbags tiles, pool table tile ,ect).
6 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1887
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 36

Post by Gurt » Fri Apr 28, 2017 6:34 pm

Nice suggestion. Adding it to the next update (Alpha v.1.3.0). There will be IObject.GetBaseSize() and IObject.GetSize().
GetBaseSize() will return the tile's base size without the size factor. GetSize() will return the current size of the object (BaseSIze * SizeFactor).
5 x
Gurt

Locked