Area Script from Killkergit..

Currently viewing this thread:

bjorne.

Sergeant Knight
Hey. About this code from Killkergit.
I found it very intresting. But I have one problem with it. It's the thing about it only hurts enemies. I want it to hurt everything. Including buildings.. If anyone has an idea of how to turn of this only enemy madness please tell me..
Thank you in advance.


Code:
[(ti_on_weapon_attack, 
   [(get_player_agent_no, ":player_agent"),
    (agent_get_team,":player_team", ":player_agent"),
    (agent_get_position,pos1,":player_agent"),
    (try_for_agents,":agent"),
      (agent_is_alive,":agent"),
      #(agent_is_human,":agent"), 
      (neq,":agent",":player_agent"),
      (agent_get_team,":team",":agent"),
      (neq,":team",":player_team"),
      (agent_get_position,pos2,":agent"),
      (get_distance_between_positions,":dist",pos1,pos2),
      (lt,":dist",1500),
      (particle_system_burst,"psys_game_blood_1",pos2,100),
      (particle_system_burst,"psys_boemfik",pos2,100),
      (agent_play_sound,":agent","snd_man_die"),
      (agent_play_sound,":agent","snd_boem"),
      (store_agent_hit_points, ":cur_hit_points",":agent",1),
      (val_sub,":cur_hit_points",25),
      (agent_set_hit_points,":agent",":cur_hit_points",1),
      (agent_deliver_damage_to_agent,":player_agent",":agent"),
    (try_end),
   ])]],
 

bjorne.

Sergeant Knight
yea.. okey.. But I also need to remove the only hurting enemies thing. I want everyone to get hurted buy it.
 

Rize

Sergeant Knight at Arms
Code:
[(ti_on_weapon_attack, 
   [(get_player_agent_no, ":player_agent"),
    (agent_get_team,":player_team", ":player_agent"),
    (agent_get_position,pos1,":player_agent"),
    (try_for_agents,":agent"),
      (agent_is_alive,":agent"),
      #(agent_is_human,":agent"), 
      (neq,":agent",":player_agent"),
      (get_distance_between_positions,":dist",pos1,pos2),
      (lt,":dist",1500),
      (particle_system_burst,"psys_game_blood_1",pos2,100),
      (particle_system_burst,"psys_boemfik",pos2,100),
      (agent_play_sound,":agent","snd_man_die"),
      (agent_play_sound,":agent","snd_boem"),
      (store_agent_hit_points, ":cur_hit_points",":agent",1),
      (val_sub,":cur_hit_points",25),
      (agent_set_hit_points,":agent",":cur_hit_points",1),
      (agent_deliver_damage_to_agent,":player_agent",":agent"),
    (try_end),
   ])]],

Try this. If you remove the team part, it will hurt everyone except the player. But i don't know how to hurt buildings.
 
Top Bottom