Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Revive Enemies

A topic by Jomedy created Feb 26, 2023 Views: 227 Replies: 1
Viewing posts 1 to 2

So I want enemies to be able to revive their own allies whenever they are defeated. The only thing is that when enemies die, they disappear and they're unable to be targeted. I tried looking for what makes the player being able to be revived but I couldn't find it?

Developer

An enemy simply loses image alpha when it is killed and we stop considering it for *player* targetting. You can ofcourse make them behave exactly as player units do by copying the step event behaviour of player units (oBattleUnitPC) to  the step behavior of all units (oBattleUnit).  Replacing the section that fades out enemies so they're still visible if you want that. Or at least giving them a way to become visible again when they regain hp.

AI doesn't have the same rules as the cursor for targetting, so enemies should be able to search their unit list for a unit that has zero hp and use a revive action on it as part of their script.

You'll have to code that bit yourself though ;)