Jump to content

Need help for simple problem


pwhampton

Recommended Posts

Alright, simple thing that I cannot due to lack of knowledge. Basically, I am just trying to reduce and or remove sanity drain on the night sword for a custom character without it doing the same for every other character in the game. Also will be using this for some of the staffs.

 

Thanks for the help, (if given)

Link to comment
Share on other sites

New character mod? I would totally download a  'Simplex' character mod :-).

That's actually Wilson's face, by Willette. ;]

But anyway, to the OPer: what you want is to set up a prefab post init for the nightsword which changes its dapperness, as Cheerio said. For the character-specific part, you want to enclose that change with an "if" block which tests if the player (GLOBAL.GetPlayer()) has your character's prefab (GLOBAL.GetPlayer().prefab == "mycharacter").

Link to comment
Share on other sites

 you want to enclose that change with an "if" block which tests if the player (GLOBAL.GetPlayer()) has your character's prefab (GLOBAL.GetPlayer().prefab == "mycharacter").

Been playing around with 'if' statements and 'else', but as said, rather clueless here. This is basically what I have been tossing around and fiddling with for a while.

Trying to make a test to test for the character, but keeps giving errors no matter where I place things.

 inst:AddComponent(GLOBAL.GetPlayer().prefab == "mycharacter") if owner.prefab == "character" 	then  inst.components.dapperness.dapperness = TUNING.CRAZINESS_TINY,  	else  inst.components.dapperness.dapperness = TUNING.CRAZINESS_MED, end
Link to comment
Share on other sites

inst:AddComponent(GLOBAL.GetPlayer().prefab == "mycharacter") 

 

Invalid line of code. AddComponent expects the argument you supply to be the name of a component. You didnt give it the name of anything, you put a boolean expression where a string was expected.

 

What component are you trying to add to 'inst' here ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...