Jump to content

Recommended Posts

im trying to make a pet for my character ikaros angeloid

the pet i had in mind is a watermelon that follows the character around heals if health is lower than its total the character and engages in combat with enemies

i was hoping someone knew that code i need to use to implement that to my character

here are the character files

modinfo.lua

modmain.lua

ikaros.lua

if anyone knows the code i need to use to do it that will be appreciated

 

Link to comment
https://forums.kleientertainment.com/forums/topic/79223-help-pet-makingcoding/
Share on other sites

Well, the health can be done straight on the character by adding inst.components.health:StartRegen(amount, time) Into the section your health is in (master_postinit).

inst.components.health:StartRegen(1, 5) will heal One health every Five seconds.

 

As for pets the mod "glomster" could provide a framework (off of the steam workshop)

 

Good luck.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...