Lumina Posted August 13, 2016 Share Posted August 13, 2016 I would like to make a monster attack having the same effect than the Morning Star (more damage on wet target). I tried to look at volt goat code, but they seems to use a shock attack rather than multiply damage when the target is wet. Any advice ? Link to comment Share on other sites More sharing options...
Joachim Posted August 13, 2016 Share Posted August 13, 2016 In SGlightninggoat.lua, you see this code: if inst.charged then inst.components.combat:DoAttack(inst.sg.statemem.target, nil, nil, "electric") else inst.components.combat:DoAttack(inst.sg.statemem.target) end The "electric" part determines the stimuli of the attack. If it is electric, then there will be a certain amount of bonus damage if the target is wet. Link to comment Share on other sites More sharing options...
Lumina Posted August 13, 2016 Author Share Posted August 13, 2016 Oh, thanks. I'll look at it Link to comment Share on other sites More sharing options...
Joachim Posted August 13, 2016 Share Posted August 13, 2016 (edited) Also the shock damage that you see defined in lightninggoat.lua is the damage that you receive when you attack a charged lightninggoat, which is why it is called in OnAttacked. The DoAttack call in SGlightninggoat.lua on the other hand is when the lightninggoat itself attacks. Edited August 13, 2016 by Joachim Link to comment Share on other sites More sharing options...
Lumina Posted August 13, 2016 Author Share Posted August 13, 2016 Ok The DoAttack does what i want, i'll use it. Thanks for your help and the explanations. I'm still noob with most part of the code Link to comment Share on other sites More sharing options...
Joachim Posted August 14, 2016 Share Posted August 14, 2016 No problem. The more you delve into the code, the more you start to understand. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now