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

Client-Side

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
Ortimh
Fighter
Fighter
Posts: 34
Joined: Mon Apr 11, 2016 7:47 am
SFD Alias: Unknown
Started SFD: Pre-Alpha 1.2.1
Location: Indonesia
Gender:

Client-Side

Post by Ortimh » Mon May 09, 2016 11:40 am

Can you at least add methods for clients? This is what I've been thinking so far.

I'd like to see these methods in IGame class.

Code: Select all

abstract IPlayer GetPlayer(int PlayerID) // Gets a player with provided ID
abstract IUser GetUser(int UserID) // Gets a use with provided ID
Or at least methods that does technically the same thing.

I'd like to see these methods in IUser class.

Code: Select all

abstract Vector2 GetCameraPosition() // Gets the user's camera position in map
abstract Vector2 GetCameraScale() // Gets the user's camera scale
Or maybe a new ICamera class for itself?
Off Topic
And could you please add "when a player spawns" and "when a player kills" listeners?
0 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 » Mon May 09, 2016 9:36 pm

The ScriptAPI will get some minor new stuff in the next update including:

Code: Select all

IObject Game.GetObject(int uniqueID) // Unique id form IObject.UniqueID
IPlayer Game.GetPlayer(int uniqueID) // Unique id form IPlayer's base IObject.UniqueID
IUser Game.GetActiveUser(int userIdentifier) // id from IUser.UserIdentifier
1 x
Gurt

Locked