How can I get using a ranged projectile to use xp when it is used

Started by Casey888l on

Topic category: Help with MCreator software

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I get using a ranged projectile to use xp when it is used

I'm tryna make a mod with magic spells and stuff but I can't figure out a way to get it to reduce xp when its used.

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If it's vanilla XP (the one…
Fri, 11/22/2019 - 07:57

If it's vanilla XP (the one above the action bar), just do this procedure :

if player's XP amount > x (x being the amount of xp the spell will consume)

     give -x XP to player

     launch the spell

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the if is intended to…
Fri, 11/22/2019 - 08:01

the if is intended to prevent the player from using the spell if he hasn't enough XP