Jump to content

Recommended Posts

I'm creating a modded character, and the gimmick with this one is he is like, part beefalo (don't ask how... I'm not even sure yet).

The question is. Are you able to code it so that beefalo in mating season won't attack you? basically, like wearing a beefalo hat, but the effect is part of the character.

I only know a tiny bit about coding, so i have no clue how I would do this. If all else fails, the character spawns with a beefalo hat....

Link to comment
https://forums.kleientertainment.com/forums/topic/63611-is-this-possible/
Share on other sites

Yeah, you can. When you wear the beefalo hat, you get the tag "beefalo", so if you simply add the tag "beefalo" in your character.lua, that should do it!

It will be as if you're always wearing the beefalo hat, and they won't attack you during mating season.

Edited by GalloViking

I looked at webbers .lua for reference, and i tried putting in this my characters .lua

local function common_postinit(inst)
    inst:AddTag("beefalo")
	end

Then I loaded the character and ran into a beefalo durring heat. The beefalo attacked me. did i type the code wrong?

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...