Jump to content

Lua recipe trait checking?


IanSchot

Recommended Posts

So i've been trying to figure out how i can get a OnCreate:(This case "recipe_DoStuff") to successfuly check and fire a output if a trait is met.

I'm not too sure what i'm doing wrong here.

 

function recipe_DoStuff(items, result, player)
    --other stuff
        if player:hasTrait("WeakStomach") == true then
        player:Say("I Pooped my pants.");  --this would be my generic output.
        end
    --other stuff
end 

 

This file is in media/lua/server, if that makes a difference.

Link to comment
Share on other sites

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