Page 1 of 1
Specific unbreakability (Command)
Posted: Mon Aug 06, 2018 11:45 pm
by Jovani
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:
Re: Specific unbreakability (Command)
Posted: Tue Aug 07, 2018 3:48 am
by Danger Ross
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.
Re: Specific unbreakability (Command)
Posted: Tue Aug 07, 2018 7:20 am
by Sree
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));
}
}
}
Re: Specific unbreakability (Command)
Posted: Tue Aug 07, 2018 1:35 pm
by Del Poncho
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).
Re: Specific unbreakability (Command)
Posted: Tue Aug 07, 2018 2:43 pm
by Sree
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.