SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion > Bug Reports

Reply
 
Thread Tools Search this Thread
Old 05-23-2020   #1
Flame
"It's ok, I like you too!"
 
Flame's Avatar
Default Lua MobjDeath hook vs Intermission Screen

The Lua Hook MobjDeath can trigger on the intermission screen.
And you can get the message:
Code:
This can only be used in a level!
Here's some example code to try for yourself:
Code:
addHook("MobjDeath", function(mo)
	if mo and mo.valid
	and mo.player and mo.player.valid
		print("Something Funny")
	end
end, MT_PLAYER)
For added context, it errors at the "if mo and mo.valid" line.
__________________
Consider giving me a follow on Twitter!
  〃 ∩ ∧_∧
  ⊂⌒( ・ω・)
  `ヽ_っ_/ ̄ ̄ ̄/
       \/___/

Last edited by Flame; 05-23-2020 at 02:51 AM.
Flame is offline   Reply With Quote
Old 4 Weeks Ago   #2
Monster Iestyn
Fangtastic
Administrator
 
Monster Iestyn's Avatar
Default

Where did you get this to happen then? I've been testing with a copy of the code included loaded, but I can't get this to occur in any of SRB2's own levels (at least up to CEZ3, anyway).
__________________
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
Reply
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 01:59 AM.


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