Author Topic: Spawning monsters, troop DNA? [solved]  (Read 3597 times)

Offline Cartread

  • Moderator
  • *****
  • Posts: 110
    • View Profile
Spawning monsters, troop DNA? [solved]
« on: May 27, 2007, 06:14:45 AM »
My current problem has to do with spawning monsters after a sceneprop is destroyed.

This is in scene_props.py

("hbdoor_q01_iia_west",sokf_destructible,"hbdoor","bo_hbdoor",   [
   (ti_on_scene_prop_destroy,
    [

        (play_sound,"snd_hbabreak_door"),
        (set_position_delta,30,-10,100),
        (particle_system_add_new, "psys_woodb"),
        (particle_system_emit, "psys_woodb", 70),

        (store_trigger_param_1, ":instance_no"),
        (prop_instance_get_starting_position, 1, ":instance_no"),
        (get_player_agent_no, ":player_agent"),
        (agent_get_position, 2, ":player_agent"),
        (assign, ":rotate_side", 90),
        (try_begin),
            (position_is_behind_position, 2, 1),
            (val_mul, ":rotate_side", -1),
        (try_end),
        (position_rotate_x, 1, ":rotate_side"),
        (prop_instance_animate_to_position, ":instance_no", 1, 70),

        (play_sound,"snd_hbmummy_grunt"),
        (entry_point_get_position,5,5),(set_spawn_position, 5),(spawn_agent, "trp_skeleton"),
        (entry_point_get_position,6,6),(set_spawn_position, 6),(spawn_agent, "trp_skeleton"),
        (entry_point_get_position,7,7),(set_spawn_position, 7),(spawn_agent, "trp_mummy"),

        (assign, "$stopsearch_step1", 0),
        (assign,"$searchstep2",0),
        (val_add,"$q01_iia",1),
       
    ]),


You can see these lines:

        (entry_point_get_position,5,5),(set_spawn_position, 5),(spawn_agent, "trp_skeleton"),
        (entry_point_get_position,6,6),(set_spawn_position, 6),(spawn_agent, "trp_skeleton"),
        (entry_point_get_position,7,7),(set_spawn_position, 7),(spawn_agent, "trp_mummy"),

All right.  This is what activates these troops, but every one of the same type (orc, skeleton) looks exactly the same, and they have vertex edited faces and variable bodies/weapons.
When I spawned all monsters with dialogs/missiontemps, the variability was working.

Could troop DNA or anything else possibly make them variable again, even when spawned from "spawn_agent" ?
« Last Edit: July 10, 2007, 02:43:12 PM by Cartread »

Yoshiboy

  • Guest
Re: Spawning monsters, troop DNA? I need help
« Reply #1 on: May 27, 2007, 06:28:16 AM »
I think that the nature of that command means that you wont get any variation. I'm not sure anything can be done about that. As an alternative you could use set visitor and add_reinforcements_to_entry. At first that won't create any variation but the second time the command is fired from the same Mission template it should create variation, which I guess is better than nothing.

Offline Cartread

  • Moderator
  • *****
  • Posts: 110
    • View Profile
Re: Spawning monsters, troop DNA? I need help
« Reply #2 on: May 27, 2007, 06:31:39 AM »
Ah, add reinforcements?  Thanks for the information, great help, I will test it!