Greek fire with area damage (particles still wip but it is a import part) UPDATED WORK FINISHED
you throw greek fire (with oil mesh maybe will be replaced)
and you get a explosion of fire (still wip the looking)
UPDATED WIP FINISHED ONLY PARTICLE SYSTEM WIP NOW
all in module_items.py
Credits for unmodified code about melee area damage: killkhergit
making a better particle system (STILL WIP) but already bettered MUCH
replace in module_particle_systems
with
WIP is making the particle system do a whole place not only the positions of targets
you throw greek fire (with oil mesh maybe will be replaced)
and you get a explosion of fire (still wip the looking)
UPDATED WIP FINISHED ONLY PARTICLE SYSTEM WIP NOW
all in module_items.py
Code:
["greek_fire", "Greek Fire", [("oil",0)], itp_type_thrown|itp_can_penetrate_shield|itp_bonus_against_shield|itp_crush_through|itp_can_knock_down|itp_primary ,itcf_throw_knife, 1000 , weight(3.5)|difficulty(0)|spd_rtng(102) | shoot_speed(25) | thrust_damage(64 , cut)|max_ammo(4)|weapon_length(0),imodbits_missile,
[
(ti_on_missile_hit, # when missile hits
[
(store_trigger_param_1, ":stepper"),
(agent_get_position,pos2,":stepper"), # store shooting position pos1
(try_for_agents,":agent"), # search all agents
(agent_is_alive,":agent"), # exclude dead agents
#(agent_is_human,":agent"), # exclude not human agents (for more race mod)
(get_player_agent_no, ":player_agent"),
(neq,":agent",":player_agent"),
(neg|agent_is_ally,":agent"),
(agent_get_position,pos3,":agent"), # store missile_hit position pos3
(get_distance_between_positions,":dist",pos1,pos3), #store distance shooter and troop_got_hit
(lt,":dist",750), # before working hit should be before 1500 meters distance
(particle_system_burst, "psys_greek_fire", pos1, 1000),
(agent_play_sound,":agent","snd_man_die"), # play sound dieing man
(store_agent_hit_points, ":cur_hit_points",":agent",1), # store hit points from remaining agents
(val_sub,":cur_hit_points",25), # substract 25 hit points
(agent_set_hit_points,":agent",":cur_hit_points",1), # set hit points to 1
(agent_deliver_damage_to_agent,":stepper",":agent"), # deliver damage so troop dies
(try_end),
]),
(ti_on_missile_hit,
[
(particle_system_burst, "psys_greek_fire", pos1, 1000),
]),
(ti_on_missile_dive,
[
(particle_system_burst, "psys_water_fire", pos1, 1000),
]),
]],
Credits for unmodified code about melee area damage: killkhergit
making a better particle system (STILL WIP) but already bettered MUCH
replace in module_particle_systems
Code:
("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.5, 0.8), (1, 0), #alpha keys
(0.5, 1.0), (1, 0.9), #red keys
(0.5, 0.7),(1, 0.3), #green keys
(0.5, 0.2), (1, 0.0), #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.01), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
with
Code:
("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
500, 0.3, 0.2, 0.03, 5.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.5, 0.8), (1, 0), #alpha keys
(0.5, 1.0), (1, 0.9), #red keys
(0.5, 0.7),(1, 0.3), #green keys
(0.5, 0.2), (1, 0.0), #blue keys
(0, 0.9), (0.4, 0.9), #scale keys
(0.2, 0.2, 0.5), #emit box size
(0, 0, 0.4), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("greek_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
50000, 0.3, 0.2, 0.03, 5.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.5, 0.8), (1, 0), #alpha keys
(0.5, 1.0), (1, 0.9), #red keys
(1, 1),(1, 1), #green keys
(0.5, 0.2), (1, 0.0), #blue keys
(0, 0.9), (0.4, 0.9), #scale keys
(5, 5, 5), #emit box size
(0, 0, 0.4), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("water_fire", psf_emit_at_water_level, "prt_mesh_fire_1",
50000, 0.3, 0.2, 0.03, 5.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.5, 0.8), (1, 0), #alpha keys
(0.5, 1.0), (1, 0.9), #red keys
(1, 1),(1, 1), #green keys
(0.5, 0.2), (1, 0.0), #blue keys
(0, 0.9), (0.4, 0.9), #scale keys
(5, 5, 5), #emit box size
(0, 0, 0.4), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
WIP is making the particle system do a whole place not only the positions of targets