Is there a way in ACS to check if an actor actually exists and then only do stuff if the actor is actually real?
Specifically, I'm looking to manipulate the player's inventory and, depending on which mods are loaded, I want it to do different things. However, if mods are not loaded, then certain actors won't even exist as far as the game is concerned, so I don't want to perform operations on non-existant actors.
Code: Select all
if (CheckActorExists("CoolHealthItem") == 1)
{
SetHUDSize (640, 480, 0);
HUDMessageBold (s:"You look like you could use this.";
HUDMSG_PLAIN, 44, CR_GREEN, 320.4, 340.0, 3.0);
GiveInventory ("CoolHealthItem", 1);
}
else
{
SetHUDSize (640, 480, 0);
HUDMessageBold (s:"Here, let me patch you up a bit.";
HUDMSG_PLAIN, 44, CR_GREEN, 320.4, 340.0, 3.0);
HealThing(20);
}
Possible?