Goldenhog
Wandering Protagonist
Code:
// A_S1GRCheck
//
// Checks the current number of rings the player has.
// If below 50, it becomes invisible and intangible.
// If above or equal to 50, it can be seen and interacted with.
function A_S1GRCheck(actor, var1, var2)
for player in players.iterate
if player.health < 50
actor.flags = ($1|MF_NOCLIPTHING)
actor.flags2 = ($1|MF2_DONTDRAW)
elseif player.health >= 50
actor.flags = ~(MF_NOCLIPTHING)
actor.flags2 = ~(MF2_DONTDRAW)
end
end
end