Trouble Making ranged weapon with multiple custom ammo types and effects

Started by ArcadeF0x on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trouble Making ranged weapon with multiple custom ammo types and effects

I'm trying to make a Metroid mod, I have no clue how to make Samus' arm cannon and multiple beam types. can anyone help please

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So I don't exactly know how…
Fri, 12/30/2022 - 00:31

So I don't exactly know how to do this, and I've never done it before

But maybe you can try to use the trigger WhenRangedItemUsed

So it'd be like:

If - Has [Event/target entity] in inventory {ammo type}
do - Shoot {ranged attack} from entity: [Event/target entity] with speed [number] inaccuracy [number]
	 Remove [number of ammo] {ammo type} from [Event/target entity] main inventory

You'd have to make each different attack its own separate Ranged Item and just use those in place of the {ranged attack}, and it'd give you the ability to define each attack separately

If you have more than two, I guess you could just repeat the code over and over

Like I said, I've never done this before, so I hope this helps

 

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, but how do you make…
Fri, 12/30/2022 - 18:28

Ok, but how do you make custom ammo?

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would have to make each…
Mon, 01/02/2023 - 04:42

You would have to make each ammo its own Ranged Weapon and Item

 

To make the actual projectile that is fired, you would need a Ranged Weapon. There, you could define its damage, effect, knockback, etc. Then, you would need to put this projectile into the {ranged attack}

To make the ammo type that the player would need in their inventory, you would need to make an Item for that. You would then substitute the ammo Item in the {ammo type} 

When you fire the weapon, it will spawn the custom projectile and take out a certain amount of ammo from the players inventory, defined as [number of ammo]