Condition inArea (RP side)

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Condition inArea (RP side)

Post by Parel803 »

Good morning,
Taken the random jamming from https://www.matrixgames.com/forums/view ... 6&t=315208
Used a condition to be inArea from another post:
Thanks for all the info

unit_to_check = ScenEdit_GetUnit({name='Tessie #1', guid='P7ML9T-0HMG455P0227E'})
local checkval = false;
checkval = unit_to_check:inArea({'a1','a2','a3','a4'});
if checkval == true then
print('Raven in area');
return true
else
print ('Raven not in assigned area')
return false
end

A question:
Can I somewhere state which side the RP's should be from? If I tested correctly they can be from all sides.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: Condition inArea (RP side)

Post by KnightHawk75 »

No it'll search all sides for a matching name in the order the sides were added to the scene. If you have two named the same on two different sides I believe you may be able to get it by using guids of the rps vs names (or at some point in the past you could).
Parel803
Posts: 962
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

Re: Condition inArea (RP side)

Post by Parel803 »

KH, thx for your answer and time.
I'll check on the guid for RP.
best regards GJ
Post Reply

Return to “Lua Legion”