Basically I want Unidus to throw all of its orbs at the player and then regenerate them back so it can do it again. What's the cleanest way to do this through lua, if there is one?
I believe a clean way to do it would be to remove the Unidus and spawn a new one at the exact same coordinates, since I don't think there is any option to make its spikeballs reappear.
There's a bit of the spawning code that handles things in hardcode, so if you're willing to wait a few hours whilst I wake up I could help give you a Lua-ported starting point to work off of.
Using the "MobjSpawn" hook you can recreate everything in Lua.
Some notes though:
* The P_SetTarget function is automatically used when you assign a value to mobj.target, so you don't need it.
* Unlike C, ball.state in Lua gives you the state NUMBER not the state_t structure, so use states[ball.state].action(ball) to call the action for the Unidus's spikeballs. The action call IS needed to make sure the spikeball's position is corrected so I'm aware.
Status
Not open for further replies.
Who is viewing this thread (Total: 0, Members: 0, Guests: 0)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.