Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ill Try To Explain an Easy Way But Ill Include A WorkSpaceDownload For You
- Link -> https://github.com/spacemex/McreatorHelpful
- This Is My Take On It But You Can Tailer This To Your Liking With Effects And Messages And Such .
- What Were Going To Need:
- 2 Global Variables
- 2 Procedures
- And A Item
- 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.
- Now We Can Create Our Second Global Variable. Click The Green Plus Again And Name It b(YourModName)AllowHeal ,
- 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.
- 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 ,
- 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,
- If You Found That To Be A Bit Hard To Follow Along To Here's A Link To A Video By @NorthWestTrees Gaming <Here>
- Now That We Created Our Timer We Can Create Our Second Prod Lets Name It (YourModName)HealPlayer.
- Now Set The Global Trigger To No Additonal Trigger
- Add A If Block , For If get Allow Heal = true
- do add a if block current health of event/targetentity < Max Health OF Event/Target Entity,
- Do Set Health of event/targetentity to Max Health Of Event/TargetEntity
- Set Global Allow Heal To False,
- Set Global Timer To 300
- 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.
- 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
- Hope This Helps
- ~~~ Space
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement