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

Started by Casey888l on Thu, 11/21/2019 - 21:25

Topic category: Help with MCreator software

Last seen on 12:46, 17. Jul 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How can I get using a ranged projectile to use xp when it is used
Thu, 11/21/2019 - 21:25

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.

Last seen on 16:08, 27. Jun 2020
Joined Jan 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 16:08, 27. Jun 2020
Joined Jan 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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