SRB2 Message Board  

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

Thread Tools Search this Thread
Old 01-17-2020   #1
Wandering Protagonist
Goldenhog's Avatar
Default Cannot check MTF_EXTRA?

if (mo.spawnpoint.options & MTF_EXTRA)
This does not work, it throws up an "attempt to perform arithmetic on global 'MTF_EXTRA' (a nil value)" error. I know the syntax is correct, because if I change it to MTF_OBJECTFLIP, MTF_OBJECTSPECIAL or MTF_AMBUSH, it works.

Did the way MTF_EXTRA changed and the wiki is not up to date with it yet, or is it bugged?
Originally Posted by Asagi Asagiri
I need power over the people! The stupid, STUPID people!
Goldenhog is offline   Reply With Quote
Old 01-17-2020   #2
Absolute territory where
Lat''s Avatar

For some reason, I don't recall MTF_EXTRA ever working in Lua back in 2.1, I've always had to manually redefine it. I suppose this wasn't fixed in 2.2.

In the meantime you can just add
local MTF_EXTRA = 1
on relevant parts.
Originally Posted by MADVAL2 View Post
glad there is no Zero Two in this pack,i really get mad everytime i see Zero Two
Lat' is offline   Reply With Quote
Old 01-18-2020   #3
Zwip-Zwap Zapony
Zwip-Zwap Zapony's Avatar

I can confirm that nothing in v2.2.0's source code seems to push MTF_EXTRA to Lua stuff, while the other map thing flags are properly pushed.

Whether or not that's intentional, I don't know, but there aren't any comments in the source code stating that it's intentional.

Last edited by Zwip-Zwap Zapony; 01-18-2020 at 09:44 AM. Reason: Changed the first "the source code" to "v2.2.0's source code"
Zwip-Zwap Zapony is offline   Reply With Quote
Old 01-18-2020   #4
Monster Iestyn
Monster Iestyn's Avatar

IIRC what we now know as "MTF_EXTRA" didn't have a name at all in 2.1, and we accounted for that lack of name in the code that parses SOC/Lua at the time. Obviously we forgot to update said code once it got a name in 2.2.

In other words this is a bug and it is not intentional.
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
Old 01-18-2020   #5
SteelT's Avatar

It was fixed here for 2.2.1
SteelT 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 07:54 PM.

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