SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Thread Tools Search this Thread
Old 08-06-2017   #1
I do things sometimes
CobaltBW's Avatar
Default Is there a way to respawn Unidus's orbs?

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?

Check out my soundcloud profile for music stuff
CobaltBW is offline   Reply With Quote
Old 08-06-2017   #2
"Lat'"'s Avatar

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.
Originally Posted by Bronydude2k5 View Post
If you make me a Sash Lilac wad, I'll make you a sonic sprite hack of any choice.
"Lat'" is offline   Reply With Quote
Old 08-06-2017   #3
toaster's Avatar

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.
<fickle> giant robo-hood that rips the map apart with her bare hands
toaster is online now   Reply With Quote
Old 08-06-2017   #4
Monster Iestyn
Friendly Neighbour-Hood
Monster Iestyn's Avatar

This is where the Unidus's orbs are actually spawned in the C code:

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, 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.
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:08 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.