Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

And/Or condition for RUS EvalUnqUnit event

Sun Oct 19, 2014 3:03 am

I have a question on an event I am creating for RUS. Basically I have created a locked 2 star general in Moscow. If any unlocked 2 star general is killed or wounded in the game, then I want to unlock the 2 star general in Moscow. He represents a replacement for the killed or wounded 2 star general.

Here is the event:
-----------------------------------------------
Conditions
EvalUnqUnit = uni_RED_Kork2; 0; [NOT]
EvalUnqUnit = uni_RED_Mezheninov2; 0; [NOT]
EvalUnqUnit = uni_RED_Uborevich2; 0; [NOT]
EvalUnqUnit = uni_RED_Gorodovikov2; 0; [NOT]
EvalUnqUnit = uni_RED_Sollogub2; 0; [NOT]
Actions
SelectUnqSubUnits = I.I. Vatzetis
ChangeFixing = 0
DescEvent = xxxx
EndEvent
-------------------------------------------------

My question has to do with the conditions. I am checking the condition of five 2 star general which I have listed using EvalUnqUnit. For example, "uni_RED_Kork2; 0;" is a check to see if General Kork is present and unlocked. The [NOT] indicates the condition is false if General Kork is present and unlocked. So all conditions will read false if each general is present and unlocked, thus not dead or wounded. All conditions reading as false will not activate the action.

My question is whether one single True condition is enough to activate the action or if all conditions must be true to activate the condition?

I can't see how the script differentiates between an "And" command or an "Or" command. If the script reads as "And", then all conditions must be true to activate the action. If the script reads as "Or", then only one condition must be true to activate the action. And I want the conditions read as an "Or". If any one general is dead or wounded, I want the action activated to unlock the replacement 2 star general.

Can anyone help me out on this one? What am I missing here?

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Sun Oct 19, 2014 3:26 am

I was just looking at the Provisional Leader System for VPN and later. I assume RUS is later than VPN. It might, maybe, be a better approach than the EvalUnqUnit event above. Although I still would like to know the answer to the AND/OR question. I would think it would be very important to know whether And/or applies anytime we are dealing with a list.

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Sun Oct 19, 2014 7:25 am

The Scripts do not work with "or"

So for your event to work as you intend, you would have to Make a separate event for each dead general. Plus, the killing and replacement of any one of them should cancel the possible ocurrence of all the others.

Lots of work to make such "or" events. I should know, there are some of them in AJE... ;)

Cya
[SIGPIC][/SIGPIC]

Jagger2013
General of the Army
Posts: 641
Joined: Sat Apr 27, 2013 2:14 am

Sun Oct 19, 2014 3:43 pm

Thanks Franciscus, You just saved me a lot of time testing and banging my head against the monitor trying to figure out why it wasn't working. The provisional leader system might be the way to go. I think I will look into it today. The one drawback is that it looks like an identifier has to be added either to the model or unit database to create a list of elgible replacements.

Thanks again!

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 2 guests