Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

[Discontinued] ScriptAPI Suggestions

Give us your input on how we may improve the ScriptAPI in the game in future versions.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

[Discontinued] ScriptAPI Suggestions

Post by JakSparro98 » Sun Feb 11, 2018 3:15 am

This thread was discontinued due to the opening of an official dedicated section for posting ScriptAPI related suggestions, you can post your ideas here, as a brand new thread for each of them.

This topic is used to collect small ScriptAPI suggestions that, like his map editor counterpart, won't take an entire thread to explain how they works.

You can suggest things like:
  • Attributes and methods / overloads additions for existing classes.
  • missing trigger functions that are already covered in the ScritpAPI but are not covered by triggers.
Last edited by JakSparro98 on Wed Mar 07, 2018 11:04 pm, edited 4 times in total.
1 x

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

Post by Gurt » Sun Feb 11, 2018 11:37 am

I'm editing your topic here.
Let's just keep small suggestions like attributes, methods and overload functions to existing classes here.
You might also suggest missing triggers to functions that already existing in the ScritpAPI but is not covered by triggers.

Any other suggestions should be in it's own topic (new classes and brand new features - that's usually NOT small suggestions).
0 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Sun Feb 11, 2018 3:17 pm

I took the trouble to modify again the previous post by even adding the trigger example you made, just to avoid misunderstanding.
Gurt wrote:
Sun Feb 11, 2018 11:37 am
[..]Let's just keep small suggestions like attributes, methods and overload functions to existing classes here.[..]Any other suggestions should be in it's own topic (new classes and brand new features - that's usually NOT small suggestions).
Good, now I know I can open a brand new thread to talk about classes addition without worries of a warning or something. :)

I take this opportunity also to say that IProfile.Accessory is misspelled.
Last edited by JakSparro98 on Fri Feb 16, 2018 2:33 am, edited 1 time in total.
1 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Fri Feb 16, 2018 2:31 am

I was thinking about the possibility to get all objects inside a GroupMarker, a method addition like GetObjectsInGroup() that returns IObject[].
But how they will be handled when groups are not active? because they could return null if the marker is not triggered, but it's also true that those objects exist even if they are never spawned. I don't know how groups are internally handled but maybe accessing that informations before the effective spawn is not possible.

You can also spawn multiple objects from the same group, so which "generation" will be listed by the method? I was thinking about something similar to the CreatedObject from CreateTriggerArgs class, where only the last spawned object is kept.

EDIT: Another idea came but since writing a third post in a row seems a bit exaggerated I will limit to only edit this:

An overload of CreateObject that takes the same use to this suggestion I posted some time ago, simply the possibility to spawn an object deciding what side will the object face.

The overload should be something like this:
CreateObject (string objectID, Vector2 worldPosition, int FacingDirection);
1 x

User avatar
Motto73
Superfighter
Superfighter
Posts: 300
Joined: Mon May 09, 2016 7:35 am
Title: Superfighter Royale
SFD Account: Motto73
SFD Alias: Motto73, Pack-Man!
Started SFD: Multiplayer Test Demo
Location: Sunny City
Gender:
Age: 19

Post by Motto73 » Wed Feb 21, 2018 9:49 pm

I'd like to flip some objects through the scripts, like in the way you can do it in the map editor (shift+h and shift+v). I've been asked a lot about this.
1 x
Image

User avatar
Danger Ross
Superfighter
Superfighter
Posts: 92
Joined: Thu Mar 31, 2016 12:56 am
Title: Competition
SFD Alias: Danger Ross
Started SFD: first day of pre-alpha
Gender:

Post by Danger Ross » Thu Feb 22, 2018 2:59 am

At the very least we need an option to change a bg object's color :x . everything else can be worked around either way.
1 x
sorry bucko, you can't punch with swords 8-)

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Thu Feb 22, 2018 3:03 am

Danger Ross wrote:
Thu Feb 22, 2018 2:59 am
At the very least we need an option to change a bg object's color :x . everything else can be worked around either way.
Don't know what "everything else" is referring to but for tile color change, it's already planned here.
0 x

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

Post by Gurt » Thu Feb 22, 2018 9:58 pm

I thought the ScriptAPI had the face direction property available already. CreateObject now has an overload with a face direction parameter and added functions to get and set the face direction for any object. I'm already sensing a "Don't look back" kind of map - but should be possible to do already by tracking the player's position updates.

Don't know when/where you asked about the flip tile feature in the ScriptAPI Motto73 but as it's nicely presented here so I noticed it now. Might have slipped my mind if it's an old suggestion.
2 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Sun Feb 25, 2018 2:07 am

Since we are talking about old suggestions I would like to bring up this other that basically consists of a boolean for the IPlayer class that can read for a player in a kneeling-like state when landing on ground.
Image
1 x

User avatar
Motto73
Superfighter
Superfighter
Posts: 300
Joined: Mon May 09, 2016 7:35 am
Title: Superfighter Royale
SFD Account: Motto73
SFD Alias: Motto73, Pack-Man!
Started SFD: Multiplayer Test Demo
Location: Sunny City
Gender:
Age: 19

Post by Motto73 » Thu Mar 01, 2018 7:45 am

IsShooting for IPlayer, that covers both hipfiring and firing while aiming. It would be logical addition, because I didn't find any method to see if the player is aiming and shooting. Only IsHipFiring.
1 x
Image

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

Post by Gurt » Thu Mar 01, 2018 10:11 pm

Motto73 wrote:
Thu Mar 01, 2018 7:45 am
IsShooting for IPlayer, that covers both hipfiring and firing while aiming. It would be logical addition, because I didn't find any method to see if the player is aiming and shooting. Only IsHipFiring.
We don't have anything like an "IsShooting" state internally in SFD. All you do is using your weapon which may or may not be automatic or single-shots. How do you imagine the "IsShooting" property would work? Only true at the frame where you actually fire the weapon (if you have ammo left?) or do you imagine something else?
1 x
Gurt

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

Post by Gurt » Fri Mar 02, 2018 5:51 pm

JakSparro98 wrote:
Sun Feb 25, 2018 2:07 am
Since we are talking about old suggestions I would like to bring up this other that basically consists of a boolean for the IPlayer class that can read for a player in a kneeling-like state when landing on ground.
Image
Adding IPlayer.IsRecoveryKneeling and IPlayer.IsRecoveryRolling to read. IPlayer.IsRecoveryKneeling is used to track that high drop forced kneel/crouch state.
0 x
Gurt

User avatar
Motto73
Superfighter
Superfighter
Posts: 300
Joined: Mon May 09, 2016 7:35 am
Title: Superfighter Royale
SFD Account: Motto73
SFD Alias: Motto73, Pack-Man!
Started SFD: Multiplayer Test Demo
Location: Sunny City
Gender:
Age: 19

Post by Motto73 » Sun Mar 04, 2018 5:08 pm

Gurt wrote:
Thu Mar 01, 2018 10:11 pm
Motto73 wrote:
Thu Mar 01, 2018 7:45 am
IsShooting for IPlayer, that covers both hipfiring and firing while aiming. It would be logical addition, because I didn't find any method to see if the player is aiming and shooting. Only IsHipFiring.
We don't have anything like an "IsShooting" state internally in SFD. All you do is using your weapon which may or may not be automatic or single-shots. How do you imagine the "IsShooting" property would work? Only true at the frame where you actually fire the weapon (if you have ammo left?) or do you imagine something else?
I thought of the time fro when the muzzlefalsh shows up to the time recoil animation ends.
0 x
Image

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

Post by Gurt » Sun Mar 04, 2018 8:31 pm

Motto73 wrote:
Sun Mar 04, 2018 5:08 pm
Gurt wrote:
Thu Mar 01, 2018 10:11 pm
Motto73 wrote:
Thu Mar 01, 2018 7:45 am
IsShooting for IPlayer, that covers both hipfiring and firing while aiming. It would be logical addition, because I didn't find any method to see if the player is aiming and shooting. Only IsHipFiring.
We don't have anything like an "IsShooting" state internally in SFD. All you do is using your weapon which may or may not be automatic or single-shots. How do you imagine the "IsShooting" property would work? Only true at the frame where you actually fire the weapon (if you have ammo left?) or do you imagine something else?
I thought of the time fro when the muzzlefalsh shows up to the time recoil animation ends.
We won't be adding such a property as the recoil varies between weapons and some might not have any (it's only visual). I suggest you track the shooting state to your liking by using the IPlayer.Statistics.TotalShotsFired / TotalEmptyGunsFireAttempts variables. Track these variables in your code after changes and you will know when a player has fired a weapon - and track your shooting state for however long you want.
2 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Wed Mar 07, 2018 7:22 pm

I was noticing that there are trigger that can create explosions and fire nodes but there isn't a way to spawn projectile without using scripts.

I would suggest a SpawnProjectileTrigger with that properties:
  • Inheritance from IObjectTrigger.
  • A drop-down menu to select the type of projectile.
  • A projectile target object or (like for the SpawnFireNodeTrigger) a tile angle-based for the projectile direction.
0 x

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

Post by Gurt » Wed Mar 07, 2018 7:58 pm

JakSparro98 wrote:
Wed Mar 07, 2018 7:22 pm
I was noticing that there are trigger that can create explosions and fire nodes but there isn't a way to spawn projectile without using scripts.

I would suggest a SpawnProjectileTrigger with that properties:
  • Inheritance from IObjectTrigger.
  • A drop-down menu to select the type of projectile.
  • A projectile target object or (like for the SpawnFireNodeTrigger) a tile angle-based for the projectile direction.
I just created a new forum for ScriptAPI suggestions. Keep each suggestion (big or small) in individual topics. Please place this suggestion in such a topic :)

I have some backlog to go through to sort existing topics into the right categories.
1 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Wed Mar 07, 2018 8:56 pm

Gurt wrote:
Wed Mar 07, 2018 7:58 pm

I just created a new forum for ScriptAPI suggestions. Keep each suggestion (big or small) in individual topics. Please place this suggestion in such a topic :)

I have some backlog to go through to sort existing topics into the right categories.
I will discontinue the use of this thread and leave a note to invite people to post their new suggestions on the new section instead, anyway this topic needs to be moved back to "Ideas and Suggestions" section.
0 x

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest