Jump to content

Recommended Posts

[ Russian ]

 

Я делаю мод FOREST MAIDEN и хочу чтобы только меня не боялись зайцы . Я сумел найти способ чтоб они не боялись ВСЕХ персонажей, но мне надо чтоб это работало только на определенного персонажа. И в связи с этим мне надо узнать можно ли это сделать, или сделать какой-нибуть уникальный предмет чтоб кролики не боялись персонажа. 

 

 

 

[ English ( translate google =) ) ]

 

I do fashion FOREST MAIDEN and I want to just me not afraid hares. I managed to find a way not to be afraid of all the characters, but I need this to work only on a specific character. And in this regard, I have to see if you can do it, or make a unique item to realties rabbits were not afraid of the character.

Interesting. You could just remove tag "scarytoprey" for rabbit.

Thanks.

 

For the birds, I'm not sure if it's possible since birdbrain lua says

 

local function ShouldFlyAway(inst)
    local busy = inst.sg:HasStateTag("sleeping") or inst.sg:HasStateTag("busy") or inst.sg:HasStateTag("flying")
    if not busy then
        local threat = FindEntity(inst, 5, nil, nil, {'notarget'}, {'player', 'monster', 'scarytoprey'})
        return threat ~= nil or TheWorld.state.isnight
    end
end

 

Looks like even if you remove "scarytoprey" tag, you still have "player" tag.

Rezecib?

How about in modmain.lua:

local function RecheckForThreat(inst)    local busy = inst.sg:HasStateTag("sleeping") or inst.sg:HasStateTag("busy") or inst.sg:HasStateTag("flying")    if not busy then        local threat = FindEntity(inst, 5, nil, nil, {'notarget', 'birdwhisperer'}, {'player', 'monster', 'scarytoprey'})        return threat ~= nil or TheWorld.state.isnight    endendAddStategraphPostInit("bird", function(sg)	local old = sg.events.flyaway.fn	sg.events.flyaway.fn = function(inst)		if RecheckForThreat(inst) then			old(inst)		end	endend)

If you don't want to edit the brain and override it, or scan the brain to superimpose and edit a node, I guess.

 

And a:

inst:AddTag("birdwhisperer")

in your character.

How about in modmain.lua:

local function RecheckForThreat(inst)    local busy = inst.sg:HasStateTag("sleeping") or inst.sg:HasStateTag("busy") or inst.sg:HasStateTag("flying")    if not busy then        local threat = FindEntity(inst, 5, nil, nil, {'notarget', 'birdwhisperer'}, {'player', 'monster', 'scarytoprey'})        return threat ~= nil or TheWorld.state.isnight    endendAddStategraphPostInit("bird", function(sg)	local old = sg.events.flyaway.fn	sg.events.flyaway.fn = function(inst)		if RecheckForThreat(inst) then			old(inst)		end	endend)

If you don't want to edit the brain and override it, or scan the brain to superimpose and edit a node, I guess.

 

And a:

inst:AddTag("birdwhisperer")

in your character.

 

YES YES YES YES. thanks for help me. Аnd thanks to all who took part in the discussion on this topic. I believe 100% that topic can be closed to answer, BECAUSE EVERTHING WORK

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