Is this possible?

Users who are viewing this thread

Is it possible to make a projectile,say,a arrow,to make some sorta effect when it hits its target,say when it hits a guy it makes a explosion effect.Not one that behaves like explosion,but looks like one.
 
It is indeed possible, but only for throwable weapons with my area damage script:

Code:
[(ti_on_weapon_attack,
   [(get_player_agent_no, ":player_agent"), // ? (but is needed)
    (agent_get_team,":player_team", ":player_agent"), // Store player team in player_team
    (agent_get_position,pos1,":player_agent"), // Get player pos
    (try_for_agents,":agent"), // For loop, runs through every agent
      (agent_is_alive,":agent"), // Filter dead NPC's
      #(agent_is_human,":agent"), // If used, filters horses
      (neq,":agent",":player_agent"), // Filters player
      (agent_get_team,":team",":agent"), // Get agent team
      (neq,":team",":player_team"), // Filter friendlies (does NOT work on horses)
      (agent_get_position,pos2,":agent"), // Get every remaining agent's position, save to 'pos2'
      (get_distance_between_positions,":dist",pos1,pos2), // Get distance between player and pos2, for as far as I know, the projectile's touchdown position can't be 
      (lt,":dist",1500), // Distance in cm.
      // Add your effects here, make them spawn at pos2
      (store_agent_hit_points, ":cur_hit_points",":agent",1), // Store agent HP
      (val_sub,":cur_hit_points",25), // Edit copied agent HP value
      (agent_set_hit_points,":agent",":cur_hit_points",1), // Set HP to edited value
      (agent_deliver_damage_to_agent,":player_agent",":agent"), // Makes you get xp/proficiency/message of damage done
    (try_end),
   ])]],

Let a particle system burst from every agent position (pos2).

Of course this script only measures distance between the player and the enemy, but it''ll do for a while.
 
killkhergit said:
[(ti_on_weapon_attack,
  [(get_player_agent_no, ":player_agent"), // ? (but is needed)
    (agent_get_team,":player_team", ":player_agent"), // Store player team in player_team
    (agent_get_position,pos1,":player_agent"), // Get player pos
    (try_for_agents,":agent"), // For loop, runs through every agent
      (agent_is_alive,":agent"), // Filter dead NPC's
      #(agent_is_human,":agent"), // If used, filters horses
      (neq,":agent",":player_agent"), // Filters player
      (agent_get_team,":team",":agent"), // Get agent team
      (neq,":team",":player_team"), // Filter friendlies (does NOT work on horses)
      (agent_get_position,pos2,":agent"), // Get every remaining agent's position, save to 'pos2'
      (get_distance_between_positions,":dist",pos1,pos2), // Get distance between player and pos2, for as far as I know, the projectile's touchdown position can't be
      (lt,":dist",1500), // Distance in cm.
      // Add your effects here, make them spawn at pos2
      (store_agent_hit_points, ":cur_hit_points",":agent",1), // Store agent HP
      (val_sub,":cur_hit_points",25), // Edit copied agent HP value
      (agent_set_hit_points,":agent",":cur_hit_points",1), // Set HP to edited value
      (agent_deliver_damage_to_agent,":player_agent",":agent"), // Makes you get xp/proficiency/message of damage done

    (try_end),
  ])]],

Well then, I guess you have to comment these (blue) lines out.
 
Back
Top Bottom