![]() |
|
|
#1 |
|
Архивный участник
Join Date: Feb 2007
Posts: 16
|
As to place the NPC's of the city aggressive ? for example, if some player to beat in it, it to beat in player? (Without leaving the place it is clearly) ^^
Grateful! :wave: |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Code:
class 1 citizen : default_npc {
parameter:
int iSkill = 1663745;
handler:
EventHandler ATTACKED(attacker) {
myself->AddUseSkillDesire(attacker, iSkill, 0, 1, 1000000);
}
}
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Jun 2006
Posts: 126
|
if i put this, all npc when attacked, will attack? o nly need put this code in ai? or need insert for all npcs in ai?
sorry bad english. |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
First you need - compile code
Second - insert handler attacked in the class you want, maybe insert in citizen class isnt a good idea, i have some problems with some quest npcs (in C1 times, actually im not using this) that fight each other or you have to hit for some reason... anyway is easy to exclude that npcs if you know what they are. Third - If you are going to use the "paralyze" mode you need to create the skill, or change iSkill for some that exist. |
|
|
|
|
#5 | |
|
Архивный участник
Join Date: Feb 2007
Posts: 16
|
Quote:
|
|
|
|
|
|