sphere nt wrking

Started by KAKAN, Sep 02, 2015, 06:48 PM

Previous topic - Next topic

KAKAN

Hey, I have about 29 spheres in my server, which are for accessible locs like in vcmp 0.3, but from them only 15 or 19 spheres are working correctly, and other are there, but i didn't get teleported
oh no

Mashreq

Show us some functions (including onsphereentered and the vectors of those spheres)

KAKAN

:P be happy to see my code now.
function onSphereEntered( player, sphere )
{
switch( sphere.ID )
  {
case 0:
player.Pos = Vector( -933.277, -351.746, 7.22692 ); // To bank locker
break;
case 1:
player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
break;
case 2:
player.Pos = Vector( -555.477, 788.2, 97.5104 ); // To Office Buliding Lift(UP)
break;
case 3:
player.Pos = Vector( -562.089, 782.275, 22.8768 ); // To Office Buliding Lift(DOWN)
break;
case 4:
player.Pos = Vector( 140.503, -1366.83, 13.1827 ); // To Lawyers Office
break;
case 5:
player.Pos = Vector( 145.115, -1373.62, 10.432 ); // From Lawyers Office
break;
case 6:
player.Pos = Vector( 531.82, -127.311, 31.8522 ); // To Roof access near malibu #1
break;
case 7:
player.Pos = Vector( 531.851, -111.883, 10.7477 ); // From Roof access near malibu #1
break;
case 8:
player.Pos = Vector( 456.443, 30.3307, 34.8713 ); // To Roof access near malibu #2
break;
case 9:
player.Pos = Vector( 481.619, 30.4486, 11.0712 ); // From Roof access near malibu #2
break;
case 10:
player.Pos = Vector( -943.87, 1077.19, 11.0946 ); // To Lovefist
break;
case 11:
player.Pos = Vector( -888.268, 1054.37, 14.689 ); // From Lovefistcase
break;
case 12:
player.Pos = Vector( -820.836, 1355.72, 66.4525 ); // To Roof Access in Downtown #1
break;
case 13:
player.Pos = Vector( -828.593, 1304.96, 11.5887 ); // From Roof Access in Downtown #1
break;
case 14:
player.Pos = Vector( -1423.86, 941.064, 260.276 ); // To Bloodring
break;
case 15:
player.Pos = Vector( -1088.61, 1312.74, 9.50517 ); // From Bloodring
break;
case 16:
player.Pos = Vector( -1412.4, 1159.08, 266.689 ); // To Racetrack(Stadium)
break;
case 17:
player.Pos = Vector( -1086.57, 1352.84, 9.50517 ); // From Racetrack(Stadium)
break;
case 18:
player.Pos = Vector(  -445.71, 1127.11, 56.6909 ); // To VCN Building
break;
case 19:
player.Pos = Vector( -408.424, 1114.92, 11.0709 ); // From VCN Building
break;
case 20:
player.Pos = Vector( -444.803, 1253.35, 77.4241 ); // To Roof Access in Downtown #2
break;
case 21:
player.Pos = Vector( -449.452, 1252.74, 11.767 ); // From Roof Access in Downtown #2
break;
case 22:
player.Pos = Vector( -880.359, 1159.52, 17.8184 ); // To V Rock(Near Lovefist)
break;
case 23:
player.Pos = Vector( -872.045, 1161.86, 11.16 ); // From V Rock(Near Lovefist)
break;
case 24:
player.Pos = Vector( -1332.08, 1453.91, 299.146 ); // To Dirtring
break;
case 25:
player.Pos = Vector( -1105.68, 1333.03, 20.07 ); // From Dirtring
break;
case 26:
player.Pos = Vector( -890.945, 1066.15, 75.8666 ); // To Lovefist roof
break;
case 27:
player.Pos = Vector( -887.988, 1046.99, 14.4515 ); // From Lovefist roof
break;
case 28:
player.Pos = Vector( -893.183, -341.01, 13.4118 );
break;
return0;
  }
}
function locslike03( )
{
CreateSphere(null, 1, Vector(-935.85,-351.315,17.8038), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-936.923,-351.838,7.22692), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-557.433,782.167,22.8768), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-551.781,787.953,97.5104), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(142.726,-1372.82,10.432), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(139.562,-1369.64,13.1827), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(531.76,-118.642,13.337), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(531.655,-131.936,32.5095), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(475.792,30.4263,12.0714), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(462.603,30.3705,30.9712), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-893.381,1054.55,15.6737), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-940.18,1077.63,11.0946), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-829.876,1309.94,11.5467), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-813.565,1354.24,66.4603), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1090.55,1311.23,9.50517), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1443.39,936.094,262.411), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1089.59,1351.05,9.50517), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1414.77,1155.04,267.429), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-410.452,1118.05,11.0709), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-449.024,1128.07,56.6909), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-448.446,1249.33,11.767), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-448.35,1249.3,77.3986), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-874.715,1159.56,11.1825), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-877.507,1160.53,17.8152), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1108.33,1331.05,20.1156), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-1426.24,1507.62,302.902), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-892.953,1048.69,15.6737), RGB(0, 0, 200), 1);
CreateSphere(null, 1, Vector(-893.477,1050.26,75.8666), RGB(0, 0, 200), 1);
BankDoor <- CreateSphere(null, 100, Vector(-901.386,-341.213,13.3802), RGB(0, 0, 200), 1);
}
oh no

Thijn

Try adding some debug info. Printing the player position before the teleport, the sphere ID, the supposed to be teleported location, and the player position after your function is done.

KAKAN

There's no debug info and no error on the server_log
oh no

KAKAN

Oh i understand, sorry, I'll try it soon
oh no

soulshaker

Quote from: sseebbyy on Aug 04, 2015, 07:57 AMAlso, I remember once I used spheres in LU. I used like 30 spheres or something like that.
All of them were there, but only 15 or something like that were visible. Rest of them were invisible.
I guess this will happen in VC:MP too, so if anybody can test that, that info will be very useful.
maybe this?

Thijn

He already said they were there, just didn't get teleported. You're probably right that will happen though. VC:MP will only show so many sphere on screen.

KAKAN

Okay, i made something like this in onsphereentered
case 28:
player.Pos = Vector( -893.183, -341.01, 13.4118 );
print("Done!");
break;
And when i enter on that sphere nothing happens, nothing shows up there
oh no

KAKAN

The minium radius needed for spheres is 2, decrease it pl0x
oh no

MacTavish

Strange i had the same system but all sphere work pretty fine for me, have you updated the plugins?

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

KAKAN

Yes, I have, the sphere were working before 5 or 6 days, the problem came now
oh no

KAKAN

Can u give me the radius of the spheres?
oh no