Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I call a function when another function is executed?

Asked by 4 years ago

I am trying to make it so that each round you are in at the end of each round everyone dies from one explosion. I have a Function called InRound that determines if we are in a round. How would I make it so that when one function ends it calls the other function (explosion) to execute?

1 answer

Log in to vote
1
Answered by 4 years ago

You can just call the second function at the end of the first one. Like this

function InRound()
    print("In round check")
    ExplodePlayers()
end

function ExplodePlayers()
    print("Players exploded")
end

-- Just call InRound and it will do both
InRound()
Ad

Answer this question