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.

Specific unbreakability (Command)

Give us your input on how we may improve the game in future versions.
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Post Reply
User avatar
Jovani
Fighter
Fighter
Posts: 55
Joined: Sun Sep 18, 2016 2:49 am
Title: Heroe
SFD Account: Jovani
SFD Alias: Johnny
Started SFD: 2014
Location: Mexico
Gender:

Specific unbreakability (Command)

Post by Jovani » Mon Aug 06, 2018 11:45 pm

Hello everyone.
In this Topic I will talk about a command for SFD, which will serve to specify that you want it to be unbreakable, now the Makeshift and Melee Weapons can be unbreakable both or only one can, now the "IA" will only be for Guns (The acronym for command "Unbreakable" will be "UK"?).
Can we play with our pillows forever?
Another fact is that if the Melee Weapons are in unbreakable mode, then they should not lose their standard of living by throwing them.
Well that was all I hope you like.

Examples:
Image

Image
5 x
-I hope one day to have green ping on most servers...
-SFD is a good game that inspired people to make friends, be artists and "YouTubers". I hope one day SFD becomes famous and everyone recognizes it.

User avatar
Danger Ross
Superfighter
Superfighter
Posts: 154
Joined: Thu Mar 31, 2016 12:56 am
Title: Dangerous
SFD Alias: Danger Ross
Started SFD: 14 june 2012 (launch day)
Location: California
Gender:
Age: 23

Post by Danger Ross » Tue Aug 07, 2018 3:48 am

This can be done with a simple script, and it is relatively easy to do.
There is however a problem with tracking thrown objects. The same object would not be unbreakable for another person.
(of course, anything can be fixed with enough work)

EDIT: makeshift items wouldn't work very well because after they break you'll need to wait through the equip animation each time.
1 x
sorry bucko, you can't punch with swords 8-)

User avatar
Sree
Superfighter
Superfighter
Posts: 325
Joined: Sun May 08, 2016 8:19 pm
SFD Account: phasmic
SFD Alias: sree
Gender:
Age: 23

Post by Sree » Tue Aug 07, 2018 7:20 am

I thought I would make a script for this like danger ross said just to practice my knowledge over the scriptAPI and I did make it but the script doesn't work as I thought it would. everytime the durability of the makeshift item goes below 1, it would replace the makeshift item with another one but this would force the player to replay the equip animation.

If anyone could fix this, be my guest.
public void OnStartup()
{
 IObjectTimerTrigger t = (IObjectTimerTrigger)Game.CreateObject("TimerTrigger");
 t.SetIntervalTime(100);
 t.SetRepeatCount(0);
 t.SetScriptMethod("UK");
 t.Trigger();
}

public void UK (TriggerArgs args)
{
foreach(IPlayer p in Game.GetPlayers())
 { 
  MeleeWeaponItem w = p.CurrentMeleeMakeshiftWeapon;
  WeaponItem wi = p.CurrentMeleeMakeshiftWeapon.WeaponItem;
  float d = w.Durability;
  if(w.IsMakeshift)
  {
   if (d < 1)
    {
     p.RemoveWeaponItemType(WeaponItemType.Melee);
     p.GiveWeaponItem(wi);
    }
  Game.ShowPopupMessage(Convert.ToString(d));
  }
 }
}  
0 x

User avatar
Del Poncho
Superfighter
Superfighter
Posts: 262
Joined: Sat Mar 19, 2016 8:57 pm
Started SFD: July 2012 (1.0.5)
Location: Poncholand
Gender:
Age: 28

Post by Del Poncho » Tue Aug 07, 2018 1:35 pm

Well it would be nice to just have a command for in-game use, and an option for the map creator, without having to go through scripts.
Especially for the script-ignorant people like me (although I think I could manage to copy-paste it, but still).
0 x
The risk I took was caluclated, but man.....am I bad at math.

User avatar
Sree
Superfighter
Superfighter
Posts: 325
Joined: Sun May 08, 2016 8:19 pm
SFD Account: phasmic
SFD Alias: sree
Gender:
Age: 23

Post by Sree » Tue Aug 07, 2018 2:43 pm

The script is just an alternate way to get what you want to be implemented in the game. so you could either use the script to get things to work the way YOU wanted in the first place or wait till the devs officially implement this into the game which may or may not happen.
0 x

Post Reply