spawn party in day X

正在查看此主题的用户

asuramyx

Recruit
(store_current_hours, ":cur_hours"),
      (try_begin),
        (gt,":cur_hours",24),
(try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_lightspawn"),
      (lt,":num_parties",7),
      (store_random,":spawn_point",num_new_sp1),
      (val_add,":spawn_point","p_new_sp1"),
      (spawn_around_party,":spawn_point","pt_lightspawn"),
    (try_end),
    (try_end),

i use this to spawn a party after 1 day but it dosent work,if i dont use time party spawn works fine

(try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_lightspawn"),
      (lt,":num_parties",7),
      (store_random,":spawn_point",num_new_sp1),
      (val_add,":spawn_point","p_new_sp1"),
      (spawn_around_party,":spawn_point","pt_lightspawn"),
    (try_end),

Can anyone tell me what i did wrong or how can i spawn party at day X corectcly?
 
What the...? This code looks reallly suspicious.
插入代码块:
(store_random,":spawn_point",num_new_sp1),
Header_operations sas this is deprecated and to use store_random_in_range. But the latter one is not used like that.

And to clear this out: you want to spawn a party or a party template?

EDIT: (gt, ":cur_hours", 24), - Uhm...
 
You spawn parties by spawning party templates. Isn't that obvious? And store_random just stores a number between 0 and the 2nd parameter into the 1st. As to the second part, there are only 24 hours in a day. What you want is a trigger that activates after 24 hours - look at the manhunter example. The code I posted is similar enough, and it only checks every day. This is a full trigger, so you can tweak around with delays, rearms, etc, but a simple trigger with interval 24 would also work.

插入代码块:
(24, 0, 0, [(store_num_parties_of_template, ":num_parties", "pt_lightspawn"),(lt,":num_parties",7),], [(spawn_around_party,"p_new_sp1","pt_lightspawn"),]),

Unless you have more than one spawn-point, there's no need to store_random. It's probably far easier to store_random_in_range between your spawnpoints than storing a random number, and then adding that number to the first spawnpoint.
 
后退
顶部 底部