Difference between revisions of "Talk:Make character disappear"
Jump to navigation
Jump to search
imported>Mrflippy |
imported>JBurgess |
||
Line 1: | Line 1: | ||
--[[User:Mrflippy|Mrflippy]] 13:15, 12 April 2006 (EDT): I think OnDeath is only run once. I would try putting code in the GameMode block and running it if the actor is dead. (I think there's a check?) | --[[User:Mrflippy|Mrflippy]] 13:15, 12 April 2006 (EDT): I think OnDeath is only run once. I would try putting code in the GameMode block and running it if the actor is dead. (I think there's a check?) | ||
You can deadguy.getav health <= 0, but it's probably more efficient to set a flag in your onDeath block. So you may have this: | |||
<pre> | |||
short DeathFlag | |||
begin onDeath | |||
set DeathFlag to 1 | |||
end | |||
begin gameMode | |||
if DeathFlag == 1 | |||
; do stuff here | |||
endif | |||
end | |||
</pre> |
Revision as of 09:06, 13 April 2006
--Mrflippy 13:15, 12 April 2006 (EDT): I think OnDeath is only run once. I would try putting code in the GameMode block and running it if the actor is dead. (I think there's a check?)
You can deadguy.getav health <= 0, but it's probably more efficient to set a flag in your onDeath block. So you may have this:
short DeathFlag begin onDeath set DeathFlag to 1 end begin gameMode if DeathFlag == 1 ; do stuff here endif end