dynamic scenes

正在查看此主题的用户

Mydrall

Regular
Is it possible to have ONE scene that will under one condition have one set of buildings, and under a diffrent set of conditions have a diffrent set of buildings? I have been reading tutorials and have not come up with anything.
I know it is possible to under diffrent conditions have diffrent heroes or NPCs. Would I have to have an NPC with a building model attached to it? I don't even know if that last one is possible. =-P

-Rhider
 
I think this is basically what happens with sieges, they switch the scene objects around, and then put them back when the scene is done.  Look at this script example in module_scripts.py as an example.

插入代码块:
  # script_remove_siege_objects
  # Input: none
  # Output: none
  ("remove_siege_objects",
    [
      (replace_scene_props, "spr_battlement_a_destroyed", "spr_battlement_a"),
      (replace_scene_props, "spr_snowy_castle_battlement_a_destroyed", "spr_snowy_castle_battlement_a"),
      (replace_scene_props, "spr_castle_e_battlement_a_destroyed", "spr_castle_e_battlement_a"),
      (replace_scene_props, "spr_castle_battlement_a_destroyed", "spr_castle_battlement_a"),
      (replace_scene_props, "spr_castle_battlement_b_destroyed", "spr_castle_battlement_b"),
      (replace_scene_props, "spr_earth_wall_a2", "spr_earth_wall_a"),
      (replace_scene_props, "spr_earth_wall_b2", "spr_earth_wall_b"),
      (replace_scene_props, "spr_belfry_platform_b", "spr_empty"),
      (replace_scene_props, "spr_belfry_platform_a", "spr_empty"),
      (replace_scene_props, "spr_belfry_a", "spr_empty"),
      (replace_scene_props, "spr_belfry_wheel", "spr_empty"),
      (replace_scene_props, "spr_siege_ladder_12m", "spr_empty"),
      (replace_scene_props, "spr_siege_ladder_14m", "spr_empty"),
      (replace_scene_props, "spr_mangonel", "spr_empty"),
      (replace_scene_props, "spr_trebuchet_old", "spr_empty"),
      (replace_scene_props, "spr_trebuchet_new", "spr_empty"),
      (replace_scene_props, "spr_stone_ball", "spr_empty"),
      (replace_scene_props, "spr_Village_fire_big", "spr_empty"),
      ]),
 
oooooh. That gives me something to work on. I am working on a Total War mod btw, having to do a diffrent scene for every possible combination of the town would be suicide worthy.

So this is just the remove, is there a replace_scene_prop as well? (I am in the middle of a programming class right now so I can't really look for it. I am not at home)

-Rhider
 
yeah, you should be able to just use this a lot in your code

(replace_scene_props, <old_scene_prop_id>,<new_scene_prop_id>),
 
oh I get it now, that makes a lot of sense. Cool. I will have to expariment with this when I get home.

Thanks a lot =-)

-Rhider
 
后退
顶部 底部