NaglFaar said:I think that when you guys manage to get this to work properly
("tavern_door_a",sokf_destructible|sokf_moveable,"tavern_door_a","bo_tavern_door_a", [(ti_on_scene_prop_destroy,
[
(store_trigger_param_1, ":instance_no"),
(prop_instance_get_position, pos2, ":instance_no"),
(play_sound, "snd_dummy_destroyed"),
# (particle_system_burst, "psys_explosion_fire", pos1, 100), #percentage_burst_strength is 100
#(position_rotate_x, 5), #use these if you wish to rotate it
#(position_rotate_y, 5),
#(position_rotate_z, 5),
(position_move_z, pos2, -1200), #up/down #move the door out of the way (underground)
#(position_move_x, pos2, -200), #left/right
#(position_move_y, pos2, -200), #forward/back
(prop_instance_animate_to_position, ":instance_no", 2, 800), #animate to position in 8 seconds
]),
(ti_on_scene_prop_hit,
[
(play_sound, "snd_dummy_hit"),
(particle_system_burst, "psys_dummy_smoke", pos1, 100), #percentage_burst_strength is 100
]),
], 1000), #1000 hitpoints.
ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], get_spr_hit_points(scene_prop[1]), scene_prop[2], scene_prop[3]))
#SW - modified the following code to allow for higher hit points on destructable scene props
#ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], get_spr_hit_points(scene_prop[1]), scene_prop[2], scene_prop[3]))
if (len(scene_prop) == 5):
ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], get_spr_hit_points(scene_prop[1]), scene_prop[2], scene_prop[3]))
elif (len(scene_prop) == 6):
ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], scene_prop[5] , scene_prop[2], scene_prop[3]))
Yes you would have to tell the ai to attack the prop.NaglFaar said:Nice work.
Care to explain a little what the code does?
Do I have to code the ai to attack the scn_prop or will they do it automaticly?
spbf_hit_points_mask = 0x000000FF
spbf_hit_points_mask = 0x0000FFFF
("dummy_a",sokf_destructible|sokf_moveable,"arena_archery_target_b","bo_arena_archery_target_b", [
("dummy_a",sokf_destructible|spr_hit_points(1000),"arena_archery_target_b","bo_arena_archery_target_b", [