Skip to content
Snippets Groups Projects

Respawn Certain Monitors in Co-op

Merged SMS Alfredo requested to merge SMS_Alfredo/SRB2:shieldrespawn into next

Currently, normal grey monitors never ever respawn in Co-op. This makes it so that if one player grabs a shield, all other players in that server are now completely locked out of grabbing that shield. This isn't great when power-up monitors are generally uncommon and used as a reward for finding hidden areas. This merge request addresses that by letting certain monitors respawn. The monitors in question are all shield monitors, speed shoes monitors, invincibility monitors, and gravity shoes monitors.

srb20065.gif

When a monitor spawns, MF2_DONTRESPAWN is set depending on whether or not the monitor is supposed to respawn. This can be modified in real time via Lua using any hook, including MobjSpawn, as well as via A_SetObjectFlags2 in SOC. This makes it easy to set whether you want your custom monitors to respawn, or simply want to change the vanilla monitor respawning behavior.

In addition, Strong Random Monitors and Weak Random Monitors no longer apply in Co-op. Not that they would normally anyways, seeing as monitors didn't respawn before.

Test exe: monitorrespawn3.exe

Lua to force all monitors to respawn: L_RespawnMonitorsTest.lua

Edited by SMS Alfredo

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading