PLAYER_PRESISTENT variable checking from mob AI conditions

Started by U.S.S.DEFIANT on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
PLAYER_PRESISTENT variable checking from mob AI conditions

Good night.

I create a reputation system and save the data about player's relations with fractions using PLAYER_PRESISTENT variables (int variables with relation level (0 - neutral; > 0 - positive; < 0 - negative)). And I have a problem with mob AI. I want to create system: mob looking at player, cheking relations with a certain fraction and attack (if relation level is negative) or don't react (neutral or positive) on this player. But the condition on attack node calling from mob and can't check certain player variable. How can I do this?

I can make relation variable global for world, but there will be a problem on server in the future, becouse all the players will affect on reputation (every fraction will react on all players the same way).

Have someone ideas, how to do this?

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I don't understand…
Sun, 07/11/2021 - 17:25

Sorry, I don't understand the question. English is foreign for me.

There are more then one players and mob must understand, how's hostile to this mob (the mob belongs to a certain faction) and attack only this player.

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, is there no solution for…
Tue, 07/20/2021 - 09:46

So, is there no solution for my problem?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think I understand   Hes…
Tue, 07/20/2021 - 18:01

I think I understand

 

Hes saying how are you checking the player variable when multiple players could be checked

 

Id suggest using NBT tags instead so that they are actually tied to a player and can be checked against multiple players

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I add NBT tag to…
Tue, 07/20/2021 - 20:20

How can I add NBT tag to player?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No idea, id assume you just…
Tue, 07/20/2021 - 22:23

No idea, id assume you just use Entity NBT but im no expert at Mcreator