M&B 1.011 - Town Walkers: Adding them to a particular scene?

Users who are viewing this thread

N0ught

Sergeant Knight at Arms
Hello. My question about town walkers concerns this: I have a scene that is not related to any location on the world map. All of the code for walkers seems to point towards parties, not scenes. Am I missing something? Or is there somewhere in the module system, where the code checks to see which scenes it should add them to? It seems like that should be somewhere, because there are no walkers in arenas, taverns, shops, etc. :???:
 
1:Make a new mission template
2:look a mt_town_center and copy all the scripts and stuff that has to do with walkers
such as init_town_walker_agents,
DO NOT CONFUSE INIT_TOWN_WALKERS WITH INIT_TOWN_WALKER_AGENTS
set_town_walker destination, tick_town_walkers etc
to your new mission template.


3: add troops as visitors
that are from walkers_begin to walkers_end
DO NOT USE "script_init_town_walkers" to spawn the walkers, it doesnt work.

Hope this works out for you! It did for me!
 
Already had a template, so that part was easy. This is what I added to the mission template:
(32,mtef_visitor_source,af_override_horse,0,1,[]),(33,mtef_visitor_source,af_override_horse,0,1,[]),(34,mtef_visitor_source,af_override_horse,0,1,[]),(35,mtef_visitor_source,af_override_horse,0,1,[]),(36,mtef_visitor_source,af_override_horse,0,1,[]),(37,mtef_visitor_source,af_override_horse,0,1,[]),(38,mtef_visitor_source,af_override_horse,0,1,[]),(39,mtef_visitor_source,af_override_horse,0,1,[]),

...and then below this in the template trigger area:

(ti_on_agent_spawn, 0, 0, [],
      [
        (store_trigger_param_1, ":agent_no"),
        (call_script, "script_init_town_agent", ":agent_no"),
        ]),
(1, 0, ti_once, [],
        [
          (call_script, "script_init_town_walker_agents"),
    ]),
(3, 0, 0, [(call_script, "script_tick_town_walkers")], []),

... I also added the following to the menu leading to it:
        (modify_visitors_at_site, "scn_thescene"),
        (reset_visitors),
        (set_visitor,32,"trp_town_walker_1"),
        (set_visitor,33,"trp_town_walker_2"),
        (set_visitor,34,"trp_town_walker_1"),
        (set_visitor,35,"trp_town_walker_2"),
        (set_visitor,36,"trp_town_walker_1"),
        (set_visitor,37,"trp_town_walker_2"),
        (set_visitor,38,"trp_town_walker_1"),
        (set_visitor,39,"trp_town_walker_2"),
        (jump_to_scene,"scn_thescene"),
        (change_screen_mission),

And I added entry points 32 through 39 to the scene. Am I missing something? Because they are not appearing.  :???:

EDIT: Does the scene have to have an AI mesh?
 
**** I was going to show you what I put for my mission template but looks like it got deleted!! I guess I'm going to have to rely on my memory. so bear with me.

you dont actually need entry points for them to appear (they'll just appear at the edge of the map instead) and no you dont need an AI mesh either.

Also you forgot to add set_town_walker_destination to your template, Basicly you're going to have to put every script that has to do with making the walkers walk in your template, I think the set walker destination script is the only thing you've missed as far as I can remember.

As for your non appearing troops I think its because you used too much set_visitor operations with different entry points for the same troop? I'm not to sure for this part but I just used this
(set_visitors, yourentry, yourtroop, numberoftroop),
Or it could just be the load order you put this code in in the game menus.
If you have some reset/modify_visitor operations in the mission_template itself it MIGHT also **** the troop spawnage up
Make sure there is no reset/modifiy visitors below it too in game menus
Like I said im not exactly sure about the spawnage of the actual agents themselves, they spawned for me but I put the spawn code in the tavern game menus and Im also just relying on my memory here. But as for the making the agents walk Im pretty sure I've already covered that part atleast.  :razz:







 
This is the mt for the scene:

Code:
(   
"#(mission template name here)",0,-1,
"Dreaming dreams no mortal ever dared to dream before...",   
[
# visitors 0 and 1 are completely standard
(0, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(1, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(2, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(3, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(4, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(5, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(6, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(7, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(8, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(9, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(10, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(11, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(12, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(13, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(14, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     
(15, mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, []),     

(32,mtef_visitor_source,af_override_horse,0,1,[]),
(33,mtef_visitor_source,af_override_horse,0,1,[]),
(34,mtef_visitor_source,af_override_horse,0,1,[]),
(35,mtef_visitor_source,af_override_horse,0,1,[]),
(36,mtef_visitor_source,af_override_horse,0,1,[]),
(37,mtef_visitor_source,af_override_horse,0,1,[]),
(38,mtef_visitor_source,af_override_horse,0,1,[]),
(39,mtef_visitor_source,af_override_horse,0,1,[]),
],   
[     
(ti_on_agent_spawn, 0, 0, [],
       [
         (store_trigger_param_1, ":agent_no"),
         (call_script, "script_init_town_agent", ":agent_no"),
         ]),
(1, 0, ti_once, [],
         [
           (call_script, "script_init_town_walker_agents"),
    ]),
(3, 0, 0, [(call_script, "script_tick_town_walkers")], []),
(ti_tab_pressed, 0, 0, [],
   [(display_message, "@Cannot wake up now."),
    ]),
      common_inventory_not_available,
#(other mission template triggers here)

 ],
),

Set_walker_destination is called from the init_town_walker_agents script.
Giving the "set_visitors" option a try.
 
Sorry thats what I meant. I literally copied the triggers from the town_center mt just now and still nothing, so it must me something in the game menus part:

Code:
  ("menuname",0,
    "stub",
    "none",
    [
         (try_begin),
         (eq, "$variablename", 0),
         (modify_visitors_at_site, "scn_scenename"),
         (set_visitors,32,"trp_town_walker_1",4),
         (set_visitors,32,"trp_town_walker_2",4),
         (set_jump_mission, "mt_template_name"),
         (jump_to_scene,"scn_scenename"),
         (change_screen_mission),
         (else_try),
         (eq, "$variablename", 1),
         (assign, "$variablename", 0),
         (change_screen_map),
         (try_end),
     ],
     []
  ),
 
Really wish I could figure this out - I know its cosmetic, but this scene wont be the same without it. This is literally the last thing I have left to finish before a final playtest and a release of the new version of Solid and Shade, on my birthday, August 27th. :mrgreen:
 
Back
Top Bottom