Wombat2112
Banned
I want to learn making NPC's target and shoot player
hostile {type1} {type2} ...
- Optional.
- Specifies what types an AI controlled entity will attack and what entities a projectile with the chase subtype will seek (this does not determine what the entity can hit, only what it will intentionally attack).
- Accepted types are enemy, player, npc, obstacle, shot and you can use as many as you need. If you want entity to be hostile to nothing, just set 'none' here.
- Be aware if you use this setting, you must provide all types you wish this entity to be hostile towards. That is to say, an enemy with ‘hostile npc obstacle’ will only attack npc and obstacle types, not players.
- Also 'stealth' feature below affect if the entity will target certain other entities or not.
candamage {type1} {type2} ...
- Optional.
- Specifies what types this entity can hit (very similar to hostile, but determines what entity may hit, not what it will intentionally target).
- Available types are enemy, player, npc, obstacle, shot and you can use as many as you need. If you don't want entity to hit anything, just set 'none' here.
- Be aware if you use this setting, you must provide all types you wish this entity to be able to hit. That is to say, an enemy with ‘candamage npc obstacle’ will be able to hit npc and obstacle types, not players.
candamage player enemy obstacle
hostile player enemy obstacle
void self = getlocalvar("self");
changeentityproperty(self, "candamage", openborconstant("TYPE_PLAYER"), openborconstant("TYPE_ENEMY"), openborconstant("TYPE_OBSTACLE"), openborconstant("TYPE_NPC"));
In SORX I'm using hostile in the same way as the candamage, like this:But for the "hostle" entity property, I don't know because I don't see any example of using it. It may or may not be used for the entity property. I will let @Kratus enlighten us about it and/or how it works.
changeentityproperty(self, "hostile", "type_player", "type_npc"); //SET HOSTILE
changeentityproperty(self, "candamage", "type_player", "type_npc", "type_obstacle"); //SET CANDAMAGE
I apologizeSplit to new thread. @DOWNWARDPLUNGE, please don't derail threads with unrelated questions. Start up one of your own.
DC
I apologize