A couple questions about how to do these all to do with procedures

Started by Prox94 on

Topic category: Help with modding (Java Edition)

Last seen on 17:18, 24. Jul 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A couple questions about how to do these all to do with procedures
Fri, 11/24/2023 - 14:56 (edited)

Q1: how do i get an gaining health procedure when attacking target (gaining hp equal to damage done to entity) for a enchantment 

Q2: How can I make a specific mob change from lighting (like the zombie pigman from pig) I want to make a lightning to create electrified (zombie variant) from a zombie (only transforms a zombie)

Q3: How do make a procedure that opposites potion effect while keeping the level and time intact for example if you get hit with poison it becomes regeneration

Sorry if its a short post
 

Edited by Prox94 on Fri, 11/24/2023 - 14:56
Last seen on 19:59, 24. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Q1: a. give health boost or…
Sun, 12/10/2023 - 03:59

Q1: 
a. give health boost or absorpsion effect and set the level to be equal to "get max health" - "get current health" (minus block found in logic section) 
b. If you need help with when damaged while having enchantment then here: "Event Trigger" set to "Entity Attacked". put an if block (flow control) and set to "has 'Provided Itemstack' enchantment [your enchantment]" and set the do section to part a.

Q2:
a. in the entity's triggers section, there should be a "when struck by lightning" trigger. add a procedure to that.
b. make it so the event/target entity despawns and spawn a new entity at that location.

Q3:
a. create 2 local variables (right side of procedure interface) name them "potionlevel" and "potiontime" and set them to number
b. place a set variable block under the name "potiontime" to the amount of ticks left in the potion effect
c. place a set variable block under the name "potionlevel" to the level of potion effect
d. make it so when a certain action is achieved through an if block, place if blocks inside it and make it so that if you have a certain potion effect, itll give take away that effect and give you a different one (ex. remove poison and add regeneration)
e. set the level of the potion to "get local: 'potionlevel'"
f. set the "for __ ticks" section to "get local: 'potiontime'"
 

Last seen on 19:59, 24. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
god that took a while to…
Sun, 12/10/2023 - 03:59

god that took a while to write

Last seen on 19:59, 24. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
btw cool trick: tinker with…
Sun, 12/10/2023 - 04:00

btw cool trick: tinker with all the elements before creating an actual mod so you at least kind of know what you're doing

Last seen on 17:18, 24. Jul 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks man :) 
Sun, 12/10/2023 - 12:51

thanks man :) 

Last seen on 17:18, 24. Jul 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Q4: how do i get an healing…
Sun, 12/10/2023 - 12:53

Q4: how do i get an healing health back procedure when attacking target (healing equal to damage done to entity) for a enchantment (some thing like lifesteal)

Last seen on 17:28, 24. Jul 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure that has…
Mon, 12/11/2023 - 21:13

Make a procedure that has the trigger, something like entity takes damage. Check if the person who dealt damage is the player, and if so, give the player health boost effect with the level amount, find this is custom dependencies.