SetActorInvulnerable
Makes an actor one no blow hurts - or hittable again.
A hit on an invulnerable actor is refused before anything happens: no damage, no wound, no fight of record, no
OnActorDamage; it never turns on the attacker. The body still shows the swing land. For a vendor, a quest giver,
a guard nobody may kill.
Syntax
Section titled “Syntax”SetActorInvulnerable(id [, invulnerable])| Parameter | Type | |
|---|---|---|
id |
number | the actor |
invulnerable |
boolean | true (the default) = no blow hurts it; false = it takes hits (optional) |
Returns
Section titled “Returns”boolean - false for anything but an actor
Example
Section titled “Example”local merchant = CreateActor(nil, x, y, z, 180, "Merchant", nil, "none")SetActorInvulnerable(merchant, true)See also
Section titled “See also”IsActorInvulnerable · OnActorDamage · SetActorHostile · the NPC actors group of the index
