![]() |
Mission Editor - what do == and != mean?
Hi guys,
This is probably a simple maths/math question - for the triggers for say, damaging a ship by percentage, what do == and ! mean? I have < and > sorted (the crocodile eats the bigger number - thanks primary school!) :ping: Cheers Stew |
Quote:
5 == 5 returns true, 5 == 4 returns false a ! b means "is a not b?" So, any two different values will return true, identical values will return false. Hope that helps. Save |
Thanks Chazly for the helpful and speedy reply.
So, just to clarify, in my trigger - I can set it to damage the 'enemy ship' to an equivalent of 50% (==). Do you know what that means in the context of the what the trigger will do? Also, what does != mean in the context of damaging a ship in a trigger? Sorry, that was a typo on the original post :03: Stew |
Quote:
Save |
Thanks Chazly, here is a screen cap - you can see the options in the top right of the picture :03:
http://img.photobucket.com/albums/v3...ps225iaqlt.jpg |
Using < or > is much safer in DW editor than == because it gives you wider range for success.
Example: If you want to send message (S.O.S. - my ship is sinking!) when CVG have half or less health with code: Code:
If "platform damage" CVG 16 == 50% then 72 > 50 but not equal exactly 50 So better version of this trigger is: Code:
If "platform damage" CVG 16 > 50% then |
Quote:
|
Thanks for your help, guys - no wonder == and != aren't taught in primary school math/maths...
:Kaleun_Cheers: |
I learned something, thank-you. I am having trouble with the Editor, but I will ask in a separate thread.
|
All times are GMT -5. The time now is 11:28 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.