Post by WhyNot on Aug 21, 2016 12:20:41 GMT
Hi guys,
i'm developing a game so i need your help for some of my scripts. technically two. First One is for the menu How do I compare two Locations.
And the second one is for the save game in 3D Rad. It says that the file is not present there. can anyone help me bro's
.
Here are my scripts:
For the menu How do I compare locations. so, I mean when OBJ_0 is on location Ext and the user presses Enter and the application should close; how do I close the application:Here
And the second script:
I want the location of Camera to be written on the file:
i'm developing a game so i need your help for some of my scripts. technically two. First One is for the menu How do I compare two Locations.
And the second one is for the save game in 3D Rad. It says that the file is not present there. can anyone help me bro's
.
Here are my scripts:
For the menu How do I compare locations. so, I mean when OBJ_0 is on location Ext and the user presses Enter and the application should close; how do I close the application:Here
void Main()
{
Vector3 OBJL;
Vector3 Set;
Vector3 Sin;
Vector3 Ext;
iObjectLocation(OBJ_0, OBJL);
iEscKeyDisable();
Ext.x = 13.9181;
Ext.y = -9.70162;
Set.x = -8.28348;
Set.y = -4.26587;
Sin.x = -0.389796;
Sin.y = -1.08714;
if(iKeyDown(iKeyCode("DIK_RIGHT"))) {
iObjectLocationSet(OBJ_0, Ext);
}
if(iKeyDown(iKeyCode("DIK_UP"))) {
iObjectLocationSet(OBJ_0, Sin);
}
if(iKeyDown(iKeyCode("DIK_Down"))) {
iObjectLocationSet(OBJ_0, Set);
}
}
And the second script:
I want the location of Camera to be written on the file:
void Main()
{
float x,y,z;
Vector3 objl;
string target = "..\\veg.txt";
x = objl.x;
y = objl.y;
z = objl.z;
iObjectLocation(OBJ_0,objl);
int file = iFileWriteOpen(target);
if(iFileExists(target)) {
iObjectTextSet(OBJ_88, "true");
}
else {
iObjectTextSet(OBJ_88, "false");
}
if(iKeyDown(iKeyCode("DIK_ESCAPE"))) {
iFileValueWrite(file , x , true);
iFileValueWrite(file , y , true);
iFileValueWrite(file , z , true);
OUT_22 = x;
OUT_44 = y;
OUT_66 = z;
}
else{
iObjectTextSet(OBJ_88, "false");
}
OUT_110 = file;
}