Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
(Fixed it, does it make it easier?)
1. just remove the base.update() OR your code you probably copied from DG code (?)
2. nope. it's ok though, thanks for trying
Tried, but no success... Also, everytime i try and start up Duck Game after i edited my entire mod won't work. Like, everything just doesn't appear. (The game doesn't crash or something, but the mod doesn't load the sruff in.)
cause if not, you could just delete the overridden update function entirely, so it uses the base.update one automatically. if the issue still persists then, tell me, then we'll have to go through onpressaction too
Didn't work...
Still didn't work...
The problem is, that after making changes to the mod and loading it up again, the mod doesn't work anymore. You need to restart in order for the mod to work, and even then it doesn't load the sniper. The other weapons in the mod that i already made work fine, but this one doesn't get added...
namespace DuckGame.YourModName {
public class AWP : Sniper {
public AWP(float xval, float yval)
: base(xval, yval)
{
this.ammo = 10;
this._ammoType = (AmmoType)new ATHighCalSniper();
//leave that one out since you don't change anything this._type = "gun";
this.graphic = new Sprite("textures/AWPLightning", 0.0f, 0.0f);
this.center = new Vec2(16f, 7f);
this.collisionOffset = new Vec2(-8f, -5f);
this.collisionSize = new Vec2(16f, 9f);
this._holdOffset = new Vec2(3f, 0.0f);
this._barrelOffsetTL = new Vec2(35f, 5f);
this._fireSound = GetPath("sounds/awp1.wav");
this._fireSoundPitch = -0.2f;
this._kickForce = 3f;
this._manualLoad = true;
}
}
}
My only 2 questions are:
1. Can you change the sound of the reloading?
2. Can you make the reload take longer?
Thanks for helping me this far
public override void Update()
{
base.Update();
if (this._loadState > -1)
{
if (this.owner == null)
{
if (this._loadState == 30)
{
base.loaded = true;
}
this._loadState = -1;
this._angleOffset = 0f;
base.handOffset = Vec2.Zero;
}
if (this._loadState == 0)
{
if (Network.isActive)
{
if (base.isServerForObject)
{
this._netLoad.Play(1f, 0f);
}
}
else
{
SFX.Play(ReloadSoundName, 1f, 0f, 0f, false);
}
this._loadState++;
}
else if (this._loadState == 10)
{
if (this._angleOffset < 0.16f)
{
this._angleOffset = MathHelper.Lerp(this._angleOffset, 0.2f, 0.15f);
}
else
{
this._loadState++;
}
}
else if (this._loadState == 20)
{
base.handOffset.x += 0.4f;
if (base.handOffset.x > 4f)
{
this._loadState++;
this.Reload(true);
base.loaded = false;
}
}
else if (this._loadState == 30)
{
base.handOffset.x -= 0.4f;
if (base.handOffset.x <= 0f)
{
this._loadState++;
base.handOffset.x = 0f;
}
}
else if (this._loadState == 40)
{
if (this._angleOffset > 0.04f)
{
this._angleOffset = MathHelper.Lerp(this._angleOffset, 0f, 0.15f);
}
else
{
this._loadState = -1;
base.loaded = true;
this._angleOffset = 0f;
}
}
}
if (base.loaded && this.owner != null && this._loadState == -1)
{
base.laserSight = true;
}
else
{
base.laserSight = false;
}
}
maybe this works? if yes, you probably just had a typo all along.
(this goes in public AWP(float xval, float yval) : ...)
_netLoad = "AgainThatSameSoundEffectYouUseForReloading"
Nope
you put it next to all the other lines of course, inside the constructor's body