Variables not working properly on bullets

Started by Saiber Rida on

Topic category: Help with modding (Java Edition)

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Variables not working properly on bullets

I basically made an item that acts as a skill, this skill shots a projectile, which by default deals 0 damage

 

The bullet has a procedure attached to it, this procedure summons particles around the mob and deals damage to the target, I put a variable called TechniquePoints as the damage value, this variable's value is set to 7, and this works, 6 shots are needed in order to kill a 40 HP mob, I also added an effect that increases this value (like strength), the problem is that the value indeed changes, but the damage dealt doesn't, which doesn't make sense, with a test item I made I can see that the value changed without a doubt, but the bullet is still dealing 7 damage.

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Number Player Persistent
Mon, 08/24/2020 - 13:26

Number Player Persistent

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and it's a Global Variable
Tue, 08/25/2020 - 07:58

and it's a Global Variable

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It retains the base value of…
Wed, 08/26/2020 - 12:08

It retains the base value of the variable, so if the variable is set to 7, the projectile will always deal 7 damage, no matter how much you modify the variable in-game, it will still be 7 to the projectile, even if the variable is actually changing

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So what can I do?
Thu, 08/27/2020 - 14:50

So what can I do?