CN-bbdnmd 0 Posted May 28, 2021 I wrote "A and B and C" as the condition of the trigonometric function, but the system told me it was wrong.. So, how to write it? Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 28, 2021 Condition: A and B and C; Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 28, 2021 4 hours ago, sarogahtyp said: What? I wrote "A and B and C" in the condition box of the trigger, which means that the trigger is activated when trigger A ,B ,C takes effect. This approach is indeed effective, but the system prompts a writing error. What kind of writing format is correct? Share this post Link to post Share on other sites
bardosy 158 Posted May 28, 2021 3 hours ago, CN-bbdnmd said: I wrote "A and B and C" in the condition box of the trigger, which means that the trigger is activated when trigger A ,B ,C takes effect. This approach is indeed effective, but the system prompts a writing error. What kind of writing format is correct? You shoud write a=true in A trigger's activation field. B=true in B... etc. Then your 4th trigger will works. Share this post Link to post Share on other sites
pierremgi 4906 Posted May 28, 2021 20 hours ago, bardosy said: You shoud write a=true in A trigger's activation field. B=true in B... etc. Then your 4th trigger will works. or triggerActivated Atrigger (if Atrigger is a trigger) && triggerActivated Btrigger && triggerActivated Ctrigger which can be optimized: [Atrigger,Btrigger,Ctrigger] findIf {!triggerActivated _x} == -1 Note: Avoid giving a variable (in on activation field) the same name as the trigger itself. I.e. a=true in A trigger's activation is not a good idea. a (A) will become a boolean instead of a trigger (object). That can work for simple scenario with one trigger; that can lead to weird behavior for further scripts if any reference to the trigger). @CN-bbdnmd You should share your problem if you want a solution. Resolving trigonometric function with 3 trigger activations seems strange, to say the least. @sarogahtyp is skilled at that. So, if you want, start from your goal instead of question aside. 1 Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 29, 2021 9 hours ago, bardosy said: You shoud write a=true in A trigger's activation field. B=true in B... etc. Then your 4th trigger will works. In fact, that’s what I wrote before....The trigger does take effect, but the system prompts a writing error :A and B and C.. there is a format error Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 29, 2021 9 hours ago, pierremgi said: or triggerActivated Atrigger (if Atrigger is a trigger) && triggerActivated Btrigger && triggerActivated Ctrigger which can be optimized: [Atrigger,Btrigger,Ctrigger] findIf {!triggerActivated _x} == -1 Note: Avoid giving a variable (in on activation field) the same name as the trigger itself. I.e. a=true in A trigger's activation is not a good idea. a (A) will become a boolean instead of a trigger (object). That can work for simple scenario; that can lead to weird behavior for further scripts if any reference to the trigger). @CN-bbdnmd You should share your problem if you want a solution. Resolving trigonometric function with 3 trigger activations seems strange, to say the least. @sarogahtyp is skilled at that. So, if you want, start from your goal instead of question aside. Thank you i will try. Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 29, 2021 Trigger a :a=true; Trigger b: b=true; Trigger c : c =true; Trigger d: condition: a AND b AND c; The system error is as follows: call{a |#|AND b AND c} Error I tried the method you provided and there will still be similar formatting errors. This error symbol seems to be critical: |#|,,,it may suggest where the error is, but I can’t solve it Share this post Link to post Share on other sites
pierremgi 4906 Posted May 29, 2021 That's just a typo with invisible character when you copy paste a raw code on forum. The # indicates the location of this character. Try to locate it by cursor step by step, (left or right arrow), the cursor seem to halt on it. Delete it. Share this post Link to post Share on other sites
pierremgi 4906 Posted May 29, 2021 3 minutes ago, CN-bbdnmd said: triggerActivated Atrigger (if Atrigger is a trigger) && triggerActivated Btrigger && triggerActivated Ctrigger ,this way have the same problem I hope you removed (if Atrigger is a trigger) !! And or course, it's an example for triggers named Atrigger Btrigger, Ctrigger. You must adapt it to your trigger names. See also my previous post for invisible character. Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 29, 2021 I know the problem. The reason for this error is that the conditions are not met at the same time. After many experiments, I found that when the triggers A B C are all active at the same time, the code that triggers D will not report an error. If A B C is not valid at the same time, then the part that is not valid will be reported as an error. Share this post Link to post Share on other sites
pierremgi 4906 Posted May 29, 2021 10 hours ago, CN-bbdnmd said: I know the problem. The reason for this error is that the conditions are not met at the same time. After many experiments, I found that when the triggers A B C are all active at the same time, the code that triggers D will not report an error. If A B C is not valid at the same time, then the part that is not valid will be reported as an error. Yes. Normal. The fact is you stay on a wrong way with variable names same as trigger names, because a trigger can't be true. It can be activated or not. So, did you test: triggerActivated A && triggerActivated B && triggerActivated C despite the fact i gave you an example with some more adapted trigger names? Don't you want to share your aim, just in case there are better solutions than triggers? 1 Share this post Link to post Share on other sites
Joe98 92 Posted May 29, 2021 Place 3 boxes on the map box1 box2 box3 Place 3 triggers on the map trigger1 trigger2 trigger3 trigger1 is used to delete box1 with the command deletevehicle box1; trigger2 is used to delete box2 with the command deletevehicle box2; trigger3 is used to delete box3 with the command deletevehicle box3; Place a 4th trigger on the map. When all 3 boxes are deleted trigger 4 will fire. The command is: !(alive box1) && !(alive box2) && !(alive box3) . . 1 Share this post Link to post Share on other sites
Joe98 92 Posted May 30, 2021 I refer to post 6 in this thread and I now understand what he was trying to say. Create 3 triggers and name them: t1 t2 t3 Now create a 4th trigger. In the activation field of the 4th trigger: triggerActivated t1 && triggerActivated t2 && triggerActivated t3 If the 3 triggers are activated the 4th trigger will fire. Thank you to Pierremgi as I have learnt something today! Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 30, 2021 2 hours ago, Joe98 said: 我参考了这个帖子中的第 6 条,现在我明白他想说什么了。 创建 3 个触发器并命名它们: t1 t2 t3 现在创建第四个触发器。在第 4 个触发器的激活字段中: triggerActivated t1 && triggerActivated t2 && triggerActivated t3 如果 3 个触发器被激活,第 4 个触发器将触发。 感谢 Pierremgi,因为我今天学到了一些东西! You may encounter some problems: For example, a single trigger t3 will make t4 take effect without the need for t1 or t2. I have encountered such a problem before. Share this post Link to post Share on other sites
sarogahtyp 1109 Posted May 30, 2021 54 minutes ago, CN-bbdnmd said: You may encounter some problems: For example, a single trigger t3 will make t4 take effect without the need for t1 or t2. I have encountered such a problem before. just not true! 不符合事实 Share this post Link to post Share on other sites
pierremgi 4906 Posted May 30, 2021 43 minutes ago, CN-bbdnmd said: You may encounter some problems: For example, a single trigger t3 will make t4 take effect without the need for t1 or t2. I have encountered such a problem before. Believe me and sarogahtyp , if you write: triggerActivated A && triggerActivated B && triggerActivated C as condition of trigger D , there is no chance to activate D if one of A , B and C triggers is not activated. You must activate A and B and C to activate D. Every problem encountered before is your misunderstanding on what a variable is and a trigger is. See posts above. Share this post Link to post Share on other sites
CN-bbdnmd 0 Posted May 30, 2021 22 minutes ago, pierremgi said: 相信我和 sarogahtyp ,如果你写: triggerActivated A && triggerActivated B && triggerActivated C 作为触发器D的条件,如果未激活A,B和C触发器之一,则没有机会激活D。您必须激活 A、B 和 C 才能激活 D。 之前遇到的每个问题都是你对什么是变量和触发器的误解。见上面的帖子。 Thank you brother. I will try a few more times, maybe there was a problem with my previous experiment operation process which led to the wrong conclusion. Share this post Link to post Share on other sites