2014-09-16
11:46 AM
- last edited on
2023-08-01
02:10 PM
by
Doreena Deng
std::vector<API_Element> elemList;
GetElements(elemList, API_HotlinkID); //just a function to get all elements from the given type
size_t count = elemList.size();
for (short i = 0; i < count; i++)
{
API_Element& elem_hotlink = elemList;
std::string name = elem_hotlink.hotlink.info;
if (name != "OFC_TOWER") //filter
continue;
API_Element elem_group;
BNZeroMemory(&elem_group, sizeof(API_Element));
elem_group.header.typeID = API_GroupID;
elem_group.header.guid = elem_hotlink.hotlink.hotlinkGroupGuid;
err = ACAPI_Element_Get(&elem_group);
if (err != NoError)
{
WriteReport("Has an error %d", err);
continue;
}
WriteReport("angle: %f", elem_group.group.hlmAngle);
}
When I ran the code, "elem_group" doesn't have a value. Anyway to do this? This is in AC 17 by the way.2014-09-17 12:03 PM
elem_hotlink.hotlink.transformationin the hotlink element's tranmat (didn't see that there before)