small thing that i have no idea how to do

Started by jeux2119 on

Topic category: Advanced modding

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
small thing that i have no idea how to do

ok so i know this sounds dumb but how do i check for more then 1 brain in this procedure
https://imgur.com/a/khGWnuh

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
HOW HOW ARE YOU SO FAST
Sun, 08/06/2023 - 01:35

HOW HOW ARE YOU SO FAST

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
wait i did that the problem…
Sun, 08/06/2023 - 01:37

wait i did that the problem is its spawning 2 zombies if there is two stacks

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
i think the problem is that…
Sun, 08/06/2023 - 01:45

i think the problem is that it copys then checks the inventory but if there is another stack it will scan two copying two  and summoning two of the zombie you chose

Active 6 months ago
Joined Jun 2023
Points:
266

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
You would need to create a…
Sun, 08/06/2023 - 05:01

You would need to create a lock using a local variable. I can send some screen shots tomorrow. 

For your "if item stack iterator equals item" add an "and get local:lock = false" and then within the if statement add a "set local:lock to true" that way it can only run the code once per time you run the procedure 

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
thanks because im not sure…
Sun, 08/06/2023 - 19:19

thanks because im not sure how to do that

Active 6 months ago
Joined Jun 2023
Points:
266

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
So, there are kind of two…
Sun, 08/06/2023 - 19:54

So, there are kind of two ways of doing this, one is the way I previously suggested with the lock: https://imgur.com/dLqDSQf

The other is probably the more "correct" way to do it, by just using the for each statement to return a value and then check the value out side of the for each statement: https://imgur.com/Xjmk75c

Either way should work though. Let me know how it goes!

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
ill try them out
Sun, 08/06/2023 - 20:05

ill try them out

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
1st method worked well ifi …
Sun, 08/06/2023 - 20:14

1st method worked well ifi  have a problem in the future ill use second mode thanks and thanks for teaching me about variables

Active 6 months ago
Joined Jun 2023
Points:
266

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
No problem! Good luck on…
Sun, 08/06/2023 - 21:12

No problem! Good luck on your mod :)

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
i did the first one but…
Sun, 08/06/2023 - 23:02

i did the first one but THANK YOU SO MUCH FOR THE SECOND ONE i checked it and it works so much better

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
hey but do you know why if…
Sun, 08/06/2023 - 23:08

hey but do you know why if the zombie cost 125 brains it does not work

Active 6 months ago
Joined Jun 2023
Points:
266

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
Not sure. Do you have a…
Mon, 08/07/2023 - 02:24

Not sure. Do you have a screenshot of your procedure?

Active 4 months ago
Joined Jan 2023
Points:
348

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
here https://imgur.com/a…
Mon, 08/07/2023 - 14:43

here https://imgur.com/a/gNqhfga

also do will the tamed necromancer
summon already tamed ai