You can make an explosion on the ground using a code similar to this, its what i use for my explosive arrows:
Code:
["explo_arrow", "Flaming Arrows", [("harad_arrow",0),("harad_arrow_flying",ixmesh_flying_ammo),("harad_quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 400,weight(3)|abundance(160)|weapon_length(96)|thrust_damage(7, pierce)|max_ammo(8), imodbits_missile,
[
(ti_on_missile_hit,
[
#pos1 - Missile hit position
#param_1 - Shooter agent
(try_begin),
(multiplayer_is_server),
(store_trigger_param_1, ":shooter"),
(particle_system_burst, "psys_fireplace_fire_small", pos1, 100),
(particle_system_burst, "psys_gourd_smoke", pos1, 100),
(get_max_players, ":max"),
(try_for_range, ":i", 0, ":max"),
(player_is_active, ":i"),
(player_get_agent_id, ":agent", ":i"),
(ge, ":agent", 0),
(agent_is_alive, ":agent"),
(agent_get_position, pos2, ":agent"),
(position_move_z, pos2, 50),
(get_distance_between_positions, ":dist", pos1, pos2),
(try_begin),
(lt, ":dist", 150),
(store_agent_hit_points, ":hp", ":agent", 1),
(val_sub, ":hp", 10),
(val_max, ":hp", 0),
(agent_set_hit_points, ":agent", ":hp", 1),
(try_begin),
(eq, ":hp", 0),
(agent_deliver_damage_to_agent, ":shooter", ":agent"),
(try_end),
(try_end),
(try_end),
(try_end),
]),
]],
Explained:
["explo_arrow", "Flaming Arrows", [("arrow",0),("arrow_flying",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 400,weight(3)|abundance(160)|weapon_length(96)|thrust_damage(7, pierce)|max_ammo(
, imodbits_missile,
^My item tuple (in this case you would just make yours a throwing weapon, not an arrow).
instead of ending it with a "]", i keep it opened to add this to it:
[
(ti_on_missile_hit,
[
This makes the effect thats under it start when the missile hits an enemy, ground, or etc.
(store_trigger_param_1, ":shooter"), <---the one who shot
(particle_system_burst, "psys_fireplace_fire_small", pos1, 100), <--- pos1 is the position where the missile hit, and it
(particle_system_burst, "psys_gourd_smoke", pos1, 100), <---- makes a particle effect where pos1 is.
(get_max_players, ":max"), <---- Gets the max players on the server
(try_for_range, ":i", 0, ":max"), <--- all below until the next note, tries all players and makes sure they ARE players. (wont work on ai, my mod doesnt deal with ais, but you could find a fix to this, or if you REALLY need, ill look into it.
).
(player_is_active, ":i"),
(player_get_agent_id, ":agent", ":i"),
(ge, ":agent", 0),
(agent_is_alive, ":agent"),
(agent_get_position, pos2, ":agent"), <--- the belows compare distance to the hit, if they are close to where the hit is, they take dmg.
(position_move_z, pos2, 50),
(get_distance_between_positions, ":dist", pos1, pos2),
(store_agent_hit_points, ":hp", ":agent", 1), <--- this stores the hp from the player hit
(val_sub, ":hp", 10), <---- subtracts dmg from the hp
(val_max, ":hp", 0),
(agent_set_hit_points, ":agent", ":hp", 1), <--- sets the players health to the modified value.
(try_begin),
(eq, ":hp", 0),
(agent_deliver_damage_to_agent, ":shooter", ":agent"), <--- if player has no hp, give the shooter the kill.
(try_end),
Hoped that helped, if you need more, look at my profile for a link to my steam or pm me here
. Good luck!
P.S. sorry for all the weird indentation, the forum is weird
.