lightningstar 0 Posted January 1, 2017 Share Posted January 1, 2017 Hi, Just started using Wrobot. I want to know how to write "OR" in the conditions of the spell for example: if my health < 90 or if target health > 50 then use XYZ So I was talking about the "or" in the above example Link to comment https://wrobot.eu/forums/topic/4675-or-condition/ Share on other sites More sharing options...
iMod 99 Posted January 1, 2017 Share Posted January 1, 2017 there are two ways... 1. if(condition) { // Do something } else { // Do something else } 2. if(condition1 || condition 2) { // Do something } For your example i would use if((health < 90) || (health > 50)) { // Do something } Hope that helped. Link to comment https://wrobot.eu/forums/topic/4675-or-condition/#findComment-21693 Share on other sites More sharing options...
Droidz 2738 Posted January 2, 2017 Share Posted January 2, 2017 Hello, If you use fightclasses editor, add two time same spell, one time with the condition "health < 90" and one time with the condition "target health > 50" Link to comment https://wrobot.eu/forums/topic/4675-or-condition/#findComment-21708 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now