pwhampton Posted November 14, 2013 Share Posted November 14, 2013 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 More sharing options...
Developer Cheerio Posted November 15, 2013 Developer Share Posted November 15, 2013 I would reading the Scripting with Sublime Guide. Once you've done that, you can look for the 'nightsword.lua' file and see how it works. You will probably just want to set it's dapperness to none which you can do by replacing the night sword or by adding a postinit call. Link to comment Share on other sites More sharing options...
simplex Posted November 15, 2013 Share Posted November 15, 2013 [...] which you can do by replacing the night sword [...] Link to comment Share on other sites More sharing options...
Developer Cheerio Posted November 15, 2013 Developer Share Posted November 15, 2013 New character mod? I would totally download a 'Simplex' character mod . Link to comment Share on other sites More sharing options...
simplex Posted November 16, 2013 Share Posted November 16, 2013 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 More sharing options...
pwhampton Posted November 22, 2013 Author Share Posted November 22, 2013 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 More sharing options...
seronis Posted November 22, 2013 Share Posted November 22, 2013 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 More sharing options...
Malacath Posted November 22, 2013 Share Posted November 22, 2013 Also, this code is kind of just hanging there. Without knowing in what context is is written we might make wrong guesses. So if you could either post the full file or the whole mod it's more likely to get useful help. Link to comment Share on other sites More sharing options...
Recommended Posts
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.