Duck Game

Duck Game

View Stats:
Johan 5 Feb, 2018 @ 5:21am
Questionmark custom ammo
Hey, today i tried to make a mario fireball ammotype. It is still under development, but it only fires questionmarks not the sprite that i made for it. Does someone know what the problem is?



CODE:

//ATFire

public class ATFire : AmmoType
{
public ATFire()
{
base.accuracy = 1f;
base.penetration = 2f;
base.bulletSpeed = 9f;
base.rangeVariation = 0f;
base.speedVariation = 0f;
base.range = 200f;
base.rebound = true;
base.affectedByGravity = true;
base.deadly = true;
this.sprite = new Sprite("fire", 0f, 0f);
base.weight = 25f;
base.bulletSpeed = 8f;
base.bulletThickness = 1f;
base.immediatelyDeadly = false;
base.bulletColor = Color.White;
base.sprite.CenterOrigin();
}



}
< >
Showing 1-2 of 2 comments
Lily 7 Feb, 2018 @ 4:39am 
maybe I'm just stupid, but I don't see where you have set it to use that sprite? (I'm still new to duckgame modding, so I'm not sure, but maybe something along the lines of base.setSprite("yourSuperCoolSprite")?)

//EDIT
Now that I'm kinda more advanced, yes Bolus is right, you tell it to use "fire.png" but not where it's located.
Last edited by Lily; 24 Feb, 2018 @ 5:17am
Bolus™ 17 Feb, 2018 @ 2:57pm 
The problem is that this line does not work

Originally posted by Bot Jhon:
this.sprite = new Sprite("fire", 0f, 0f);

Try using

Originally posted by Bot Jhon:
this.sprite = new Sprite(Mod.GetPath<DuckGame.BolusWeponry.BolusWeponry>("OverBullet"), 0.0f, 0.0f);
this.sprite.CenterOrigin();
< >
Showing 1-2 of 2 comments
Per page: 1530 50