t.a.6 7 Posted March 10, 2016 Few questions: When game executing content of entities's init fields? Acceptable by editor way to set "presents probability" for 'few' entities for if they'll be created then all. Is it possible to write trigger's name in "condition of presents" field? Appreciate any help. Share this post Link to post Share on other sites
Tajin 348 Posted March 10, 2016 https://community.bistudio.com/wiki/Initialization_Order Also, condition of presence is only checked at the beginning, so you cant use it as a substitite for a spawn-script. Share this post Link to post Share on other sites
t.a.6 7 Posted March 10, 2016 Thanks but when 'init fields' executing related to each other Also, condition of presence is only checked at the beginning, so you cant use it as a substitite for a spawn-script. Point is what they are checked before scripts executing so wanted to make trigger with condition for creating units. Like: if(floor random 3==0)then{true}else{false}; (trigger's condition field) and still: "Acceptable by editor way to set "presents probability" for 'few' entities for if they'll be created then all." Share this post Link to post Share on other sites
Tajin 348 Posted March 10, 2016 Thanks but when 'init fields' executing related to each other Probably in the same order they've been placed. But I wouldn't rely on that and you usually don't need that anyway. As far as the fields are concerned, this order applies: 1. probability of presence 2. condition of presence 3. init (floor random 3)==0 No need to wrap an "if" around that btw. Your last sentence is rather cryptic. I guess you're asking if you can set the probability of presence for one unit and make the presence of other units depend on it? Simple.: - Place your first unit - set its probability to 0.25 - give it a name "mysoldier" - Place the other units - set their condition of presence: "alive mysoldier" Share this post Link to post Share on other sites
t.a.6 7 Posted March 10, 2016 usually don't need that anyway. Needed few times `|, like now - need to get trigger executing before the condition fields|`, or few times needed script executing before the init fields (better than name units and write scripts for them). (floor random 3)==0 No need to wrap an "if" around that btw. ) yep Simple.: - Place your first unit- set its probability to 0.25- give it a name "mysoldier"- Place the other units- set their condition of presence: "alive mysoldier" Yeap. just thought it possible to synchronize them some how. (oh and what if unit with condition will 'be executed' before ) ) Share this post Link to post Share on other sites
Tajin 348 Posted March 10, 2016 (oh and what if unit with condition will 'be executed' before ) ) It wont. Same goes for triggers. Anyway, if you wan't to be on the safe side, just test it. :D Share this post Link to post Share on other sites
t.a.6 7 Posted March 10, 2016 It wont. Same goes for triggers. Anyway, if you wan't to be on the safe side, just test it. :D ) , tested, in one place something ununderstanded happening - objects and units - !isnull o1 + units have probability `, objects - 100%`, units creating, objects don't. Share this post Link to post Share on other sites
t.a.6 7 Posted March 11, 2016 And one more problem: units have "random start at 2 markers, each marker have own trigger for the units presents, triggers triggering before units 'randomizing'. Share this post Link to post Share on other sites