Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2022
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. Ill Try To Explain an Easy Way But Ill Include A WorkSpaceDownload For You 
  2.  
  3. Link -> https://github.com/spacemex/McreatorHelpful
  4.  
  5.  
  6.  
  7. This Is My Take On It But You Can Tailer This To Your Liking With Effects And Messages And Such .
  8.  
  9.  
  10.  
  11. What Were Going To Need:
  12.  
  13. 2 Global Variables 
  14.  
  15. 2 Procedures
  16.  
  17. And A Item 
  18.  
  19.      First Were Going To Make Our Global Variables, The First One Should Be Our Timer So Click The Green Plus Box In The "Variables" Section, Now Name It (YourModName)Timer (This Is The Prevent Any Kind Of Conflicts With Other Mods) And Set It To A Number Variable Type, And For The Variable Scope Set It To GLOBAL_MAP, Now Set The Inital Value to 0.
  20.  
  21.      Now We Can Create Our Second Global Variable. Click The Green Plus Again And Name It b(YourModName)AllowHeal ,
  22.  
  23. The Variable Type Is Going To Be A Logic, And The Variable Scope Is Going To Be GLOBAL_MAP, And Make The Initial Value false.
  24.  
  25.      Second Were Going To Create Some Procedures 2 To Be Exact.  The First Procedure Were Going To Make Is Going To Set Our Timer And Our 2 Variables. So Create A Procedure Named (YourModName)HealTimer, And Once Its Created Were Going To Set The Global Trigger To On World Tick Update, Now We Start With A IF else  Block For The If We Are Going To Get Our Global Timer and make sure its = to 0 , the = block were looking for is in the logic area, and the 0 is in the math area, Now For Do  Were Going To Set Our Timer to 300. For The Else Set Our Timer to get Timer - 1 , You Can Find The - in the math area ,
  26.  
  27. Now Were Going To Add One More If Block. For The If GetTimer = 0, And For The Do Were Going To Set Our Global AllowHeal To True,
  28.  
  29. If You Found That To Be A Bit Hard To Follow Along To Here's A Link To A Video By @NorthWestTrees Gaming <Here>
  30.  
  31.  
  32.  
  33.  
  34.  
  35. Now That We Created Our Timer We Can Create Our Second Prod Lets Name It (YourModName)HealPlayer.
  36.  
  37. Now Set The Global Trigger To No Additonal Trigger
  38.  
  39.      Add A If Block , For If get Allow Heal = true
  40.  
  41.      do add a if block current health of event/targetentity < Max Health OF Event/Target Entity,
  42.  
  43. Do Set Health of event/targetentity to Max Health Of Event/TargetEntity
  44.  
  45. Set Global Allow Heal To False,
  46.  
  47. Set Global Timer To 300 
  48.  
  49. Now Were Done With This Part But You Can Add On To This By Sending Messages To The Player Or Action Bar  I've Included This In The Shareable Zip For The WorkSpace. 
  50.  
  51.  
  52.  
  53. Now Create Your Item And Add The HealPlayer To The  When Right-Clicked (entity pos.) Trigger And Now Make Sure To Save All And Build Before Testing Just In Case You Crash 
  54.  
  55.  
  56.  
  57. Hope This Helps 
  58.  
  59. ~~~ Space 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement