WEll, I tried my luck on creating an a script which creates a scene prop when the object is thrown. It didn't work out well. It after throwing, you got a huge lagg for 5-10 seconds and after that, it didn't even spawn. With few changes, it did but still the huge lag + crashed when looked at prop. Could some help on this? I'm new to coding so don't be too harsh
Code:
["sandbags","Sandbags", [("sand_b_barricade",0)], itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_stone, 1000 , weight(4)|difficulty(0)|spd_rtng(97) | shoot_speed(30) | thrust_damage(0 , blunt)|max_ammo(2)|weapon_length(8),imodbits_none,
[(ti_on_missile_hit, [
(multiplayer_is_server),
(store_trigger_param_1, ":meplayer"),
(multiplayer_get_my_player, ":meplayer"),
(player_get_agent_id, ":meagent", ":meplayer"),
(agent_get_position, pos2, ":meplayer"),
(position_set_z_to_ground_level, pos2),
(set_spawn_position, pos2),
(spawn_scene_prop,"spr_barricade_b"),
(particle_system_burst, "psys_dummy_smoke", pos2, 50),
(scene_prop_set_slot, reg0, scene_prop_C4_placer, ":meplayer"),
])]],