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's application

Last seen on 09:32, 8. Dec 2019
Joined Nov 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

0Upvote this forum topic
Last seen on 11:21, 8. Dec 2019
Joined Jan 2019
User points:

Statistics:

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

0Upvote this forum topic
Last seen on 11:21, 8. Dec 2019
Joined Jan 2019
User points:

Statistics:

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

 

0Upvote this forum topic