Page 1 of 1

Condition inArea (RP side)

Posted: Sun Mar 13, 2022 9:07 am
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.

Re: Condition inArea (RP side)

Posted: Mon Mar 14, 2022 3:04 am
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).

Re: Condition inArea (RP side)

Posted: Mon Mar 14, 2022 8:18 am
by Parel803
KH, thx for your answer and time.
I'll check on the guid for RP.
best regards GJ