For testing the functions I took 4 benchs with a waypoint in the center of them.
NOTE: All Scripts where ran by a OnClick event on a flag object near the test waypoints.
I then Stored the ROL's to the benches along with there ResRef's to the WayPoint. by clicking on the flag, I ran the following code.
#include "inc_rol"
void main()
{
object oArrayObject = GetWaypointByTag("ObjectArray");
location lAnchor = GetLocation(oArrayObject);
int x=1;
object oObj=GetNearestObjectByTag("TestObj",oArrayObject,x);
while (GetIsObjectValid(oObj))
{
AddObjectToROLArray(oObj,lAnchor,oArrayObject);
x++;
oObj = GetNearestObjectByTag("TestObj",oArrayObject,x);
}
}
The next flag Had the following code.
#include "inc_rol"
void main()
{
object oArrayObject = GetWaypointByTag("ObjectArray");
location lAnchor = GetLocation(GetWaypointByTag("Test_1"));
DrawROLObjectArray( lAnchor,1.0,oArrayObject);
}
It placed the objects around the waypoint just like they where around the first. So i will not bother to post that pic.
in the Next Test I drew the Array 6 times Rotating and raising it each time.
Code on the flag was:
#include "inc_rol"
const float BENCH_HIGHT = 0.40;
void main()
{
object oArrayObject = GetWaypointByTag("ObjectArray");
location lAnchor = GetLocation(GetWaypointByTag("Test_2"));
int x;
for (x=0;x<6;x++)
{
DrawROLObjectArray( lAnchor,1.0,oArrayObject);
lAnchor = RotateRaiseLocation(lAnchor,45.0,BENCH_HIGHT);
}
}
I also have no Idea why it leaned a bit.
the Next flag scaled the locations out while it rotated. ( my scaling was off for what I was shooting for in the next two test But Oh well. This is just a demo )
Code:
#include "inc_rol"
const float BENCH_HIGHT = 0.40;
void main()
{
object oArrayObject = GetWaypointByTag("ObjectArray");
location lAnchor = GetLocation(GetWaypointByTag("Test_3"));
int x;
for (x=0;x<6;x++)
{
DrawROLObjectArray( lAnchor,1.25*x,oArrayObject);
lAnchor = RotateRaiseLocation(lAnchor,45.0,BENCH_HIGHT);
}
}
The last test scaled inwards doing the same thin and ended up looking just about the same. ( Due to my Over scaling again.)
Code:
#include "inc_rol"
const float BENCH_HIGHT = 0.40;
void main()
{
object oArrayObject = GetWaypointByTag("ObjectArray");
location lAnchor = GetLocation(GetWaypointByTag("Test_4"));
int x;
for (x=0;x<6;x++)
{
DrawROLObjectArray( lAnchor,0.75*x,oArrayObject);
lAnchor = RotateRaiseLocation(lAnchor,45.0,BENCH_HIGHT);
}
}
Hope you have fun with them.
L8
Modifié par Lightfoot8, 21 août 2012 - 02:55 .