Lazwald Posted October 4, 2017 Share Posted October 4, 2017 Let's cut it short. I'm making a tome that shoots out thunder...or lightning. I don't now how to code it's ability. The abilities are SetElectric and 8-10 range. Link to comment Share on other sites More sharing options...
ptr Posted October 6, 2017 Share Posted October 6, 2017 -- code from brimstone book, put them into the onattack function of the weapon local num_lightnings = 16 local pt = attacker:GetPosition() for k = 0, num_lightnings do local rad = math.random(8, 10) local angle = k * 4 * PI / num_lightnings local pos = pt + Vector3(rad * math.cos(angle), 0, rad * math.sin(angle)) TheWorld:PushEvent("ms_sendlightningstrike", pos) Sleep(.3 + math.random() * .2) end Well, I don't get what SetElectric means 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