fixing hit_points on destructible scene props

Users who are viewing this thread

maybe this could be great invention for siege.

if someone can really make it happen to destroy the gate.. AMAZING :cool:

...not always storming via 1 ladder...
 
I just meant that when/ if you manage to get the "prop" to receive not just pierce damage and if you get a clean code, post it.
I'm not a coder myself so it's possible that you've already solved it and posted it, but I couldn't find it.

My intent wasn't to push or insult anyone. I'm just curious and made a suggestion.
If I still made my suggestion a bit fuzzy, please tell.
 
IT WORKS :grin:

Code:
  ("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.

replace
Code:
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]))

with
Code:
    #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]))

@timendanze
i'll implement this into "Calradia under Siege"  :grin:
 
yeah DARWIN!! r000x!  :twisted: :razz:

also lt. deinem final code hier gilt dies jetzt nur für tavernen türen?? (als beispiel oder?)

:?:
 
i think they will not attack automatic the gate...  :roll: :oops:

@ DARWIN: ..but it is not necessary to make all destructable, or??

(for me personally the gate is usefull to storm in)
 
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?
Yes you would have to tell the ai to attack the prop.

...You know how to do that?  Is that an existing operation?  If so that would be awesome.  No screwing around with a fake troop behind the door.  I don't know why only weapons that fire do damage.
 
I find more simple way.
header_scene_props.py
Code:
spbf_hit_points_mask       = 0x000000FF
change it.
Code:
spbf_hit_points_mask       = 0x0000FFFF
and example dummy_a
Code:
("dummy_a",sokf_destructible|sokf_moveable,"arena_archery_target_b","bo_arena_archery_target_b",   [
change it.
Code:
("dummy_a",sokf_destructible|spr_hit_points(1000),"arena_archery_target_b","bo_arena_archery_target_b",   [
After you compiled it, You must restart mount&blade.(ctrl+m don't work.)
"spbf_hit_points_mask = 0x0000FFFF" means  that hitpoints limits under 65535.
"spbf_hit_points_mask = 0x000000FF" means  that hitpoints limits under 255.
And this is important thing, don't add "sokf_moveable" flag. Try it, and I'm sorry I am not good at english.
 
very cool, I'll have to try that.

what did you mean by ctrl+m ?  is that a key shortcut in M&B or are you talking about ^M in a text file ?
 
"ctrl+M" is to restore module data. When You modified your module data, you pressed "ctrl+M" key in game, It will refrects on game quickly. But you have to set "enable edit mode" in launch menu when you started M&B. and You don't press "ctrl+M" key in 3Dmode, for exapmle in battle, in take a walk around, in tavern. It will be "CTD" - crash to desktop.

AND about I reported, If you pressed "ctrl+m" key, It will not reflect in current game.
You have to restart M&B.exe.
 
Nice work!

But why can you not use the movable flag?  I have found that when destroying things, the best way to make it destroyed is to move it out of the way quickly.

 
this ctrl+M concept sounds very interesting, I'll have to try that out.  Why have I never heard of this before!?!?!  Might not work for everything, but would be helpful for not having to start new games constantly....
 
Back
Top Bottom