Jump to content

Photo

Magic Heal


  • Please log in to reply
5 replies to this topic

#1 Blackpaintbowser

Blackpaintbowser

    Go Bowser Go

  • Members
  • Location:somewhere in the world

Posted 17 December 2021 - 10:55 PM

I want a item script that when you press the button it spends magic and heals hearts. using version 2.53


Edited by Blackpaintbowser, 18 December 2021 - 02:25 PM.


#2 ywkls

ywkls

    Master

  • Members

Posted 19 December 2021 - 12:30 PM

I want a item script that when you press the button it spends magic and heals hearts. using version 2.53

 

Try this.

item script MP_to_HP{
	void run(int MP_cost, int HP_Healed, int sfx){
		if(Link->MP>=MP_cost){
			Link->MP-=MP_cost;
			Link->HP+=HP_Healed;
			Game->PlaySound(sfx);
		}
	}
}


#3 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Location:Australia

Posted 19 December 2021 - 08:16 PM

I want a item script that when you press the button it spends magic and heals hearts. using version 2.53

Are you also using Potions in your quest?



#4 Blackpaintbowser

Blackpaintbowser

    Go Bowser Go

  • Members
  • Location:somewhere in the world

Posted 26 December 2021 - 01:00 PM

Are you also using Potions in your quest?

no



#5 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Location:Australia

Posted 26 December 2021 - 06:26 PM

no

 

In this case you can do this without scripting.

Simply make a potion item and set it so it only heals life, attach a magic cost to it and does not get removed after use and set it up as a Potion item in the subscreen.
 

Specifications for the item itself:
Item Class: Potions

HP Regained: Whatever health you want your item to restore. You can make it %-based instead of healing a fixed amount of life.

MP Regained: 0

Magic Cost: Whatever cost you want.

Removed When used: Make sure this is turned off. This is turned on by default on potion items.


  • Bagu likes this

#6 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 29 December 2021 - 01:11 PM

I just thought about a script, that allows that player to decide how many hearts/HP (in Gauge Values) he wants to restore. (32MP per 16HP)
...handled by Dialogue Branches and a Max HP check (for variable Max Heal,during Game Progress)...


I'm pretty sure that I can write it for 2.55, but I never wrote things for 2.53, so I don't know which commands and functions will work and which not


Edited by Bagu, 29 December 2021 - 01:13 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users