The following commands work on individual monsters:
|
Monster_Select monster, type, polygon |
This command will return a reference to a monster of type type in polygon polygon, and put that reference into monster. If there is no monster of that type in the polygon, Monster_Select returns -1. If there is more than one monster, the monster chosen is random (sort of). A monster reference obtained through this command is valid while that monster is alive. Pfhortran has mnemonics for the various monster types, see below. |
Monster_Move monster, polygon |
This command will cause monster monster to try to go to polygon polygon. The exact path he takes may vary, as the effect of this command is identical to what would happen if the engine had decided he should go to that polygon for any other reason (goal polygon, chasing another monster, etc.). |
Monster_Sleep monster |
This command will deactivate the monster monster. He will stop moving, but can wake up if he sees a need to. |
Monster_Hurt monster, damage |
This command does damage points of Fist damage to monster monster. If appropriate, the monster will wake up, or die. The monster will react as if he had been dealt that much damage by a normal projectile, this may include being flung across the room for large amounts of damage |
Monster_Attack monster1, monster2 |
This command will cause monster1 to attack monster2. The friend/enemy settings are bypassed; any monster can be made to attack any other with this command. |
The following commands alter the properties of monsters. Since they effectively change the physics model while the game is running, they affect all monsters of that type.
|
Monster_Get_Immunity monster, type, value |
This command will return the value of monster's invulnerability to damage of type type in value. Value is 0 if the monster is vulnerable to that damage type, 1 if he is immune. Pfhortran has mnemonics for the damage types, see below. |
Monster_Set_Immunity monster, type, value |
This command will turn on or off monster's invulnerability to damage of type type. Set value to 0 to make him vulnerable, 1 to make him immune. Sending any other value to this command causes an error. Pfhortran has mnemonics for the damage types, see below. |
Monster_Get_Weakness monster, type, value |
This command will return the value of monster's weakness to damage of type type in value. Value is 0 if the monster is not weak to that damage type, 1 if he is. Pfhortran has mnemonics for the damage types, see below. (FYI: Weakness causes a monster to take double damage from that type, and to always suffer hard death.) |
Monster_Set_Weakness monster, type, value |
This command will turn on or off monster's weakness to damage of type type. Set value to 0 to make him normal, 1 to make him weak. Sending any other value to this command causes an error. Pfhortran has mnemonics for the damage types, see below. (FYI: Weakness causes a monster to take double damage from that type, and to always suffer hard death.) |
Monster_Get_Friend monster, class, value |
This command will return the value of monster's friendliness to monsters of class class in value. Value is 0 if the monster is not friendly to that monster class, 1 if he is. Pfhortran has mnemonics for the monster class types, which are different from the basic monster types, see below. A monster will not wake up if he sees a friend, and he will ignore a friend who shoots him. |
Monster_Set_Friend monster, class, value |
This command will turn on or off monster's friendship of monsters of class class. Set value to 0 to make the monster non_friendly towards that class; set it to 1 to make him friendly. Pfhortran has mnemonics for the monster class types, which are different from the basic monster types, see below. A monster will not wake up if he sees a friend, and he will ignore a friend who shoots him. |
Monster_Get_Enemy monster, class, value |
This command will return the value of monster's hatred of monsters of class class in value. Value is 0 if the monster is not an enemy of that monster class, 1 if he is. Pfhortran has mnemonics for the monster class types, which are different from the basic monster types, see below. A monster will wake up and/or attack if he sees an enemy. |
Monster_Set_Enemy monster, class, value |
This command will turn on or off monster's hatred of monsters of class class. Set value to 0 to make the monster not hate that class; set it to 1 to make him hate it. Pfhortran has mnemonics for the monster class types, which are different from the basic monster types, see below. A monster will wake up and/or attack if he sees an enemy. |
Monster_Get_Item monster, value |
This command will return the item dropped by monster when it is killed. If there is no item, value will be 0. |
Monster_Set_Item monster, value |
This command will set the item dropped by monster when it is killed. Set this to 0 to cause it to not drop anything. |