Quantcast
Channel: ZDoom
Viewing all articles
Browse latest Browse all 3391

Scripting • Re: +INVENTORY.UNCLEARABLE set globally

$
0
0
Personal loan wrote: ↑
You will want to use an event handler for this:

Code:

Class UnclearableHandler : EventHandler{Override void WorldThingSpawned(WorldEvent e){//If an inventory item was spawned, set the flag to trueIf(e.Thing is "Inventory"){Inventory(e.Thing).bUNCLEARABLE=1;}}//Starting items aren't spawned, so they need to be iterated through and have the flag set that wayOverride void PlayerEntered(PlayerEvent e){let playe = players[e.PlayerNumber];Inventory next;For(Inventory item = playe.mo.Inv; item; item=next){next=item.Inv;item.bUNCLEARABLE=1;}}}

Good, I'll learn it.

Statistics: Posted by seyanizikix — Thu May 08, 2025 11:53 pm



Viewing all articles
Browse latest Browse all 3391

Trending Articles