This topic was marked solved by its starter, on October 10th, 09:02 PM

Gulk2

  • Newbie
  • Posts: 21
Spawnscreen texture issue
«  »Last edited
Ok check out this video, i captioned the parts with the issue.
Yeah maybe it's not a VCMP issue, and GTAVC's - but i can't solve this.
Maybe someone has a better understanding of what is going on here.

The textures at the police station and at the beach glitch out at certain times, and scrolling left/right sometimes temporarily fixes them.

Video:

https://youtu.be/tebj73m1a9U

Script:
Code: [Select]
function onPlayerRequestClass( player, classID, team, skin )
{
switch( skin )
    {
    case 1:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( -971.0, 280.0, -100.0 );
player.SetCameraPos(Vector(-971.0, 280.0, 40.0),Vector(-1067.0, 320.0, 10.0));
player.PlaySound(361);
player.PlaySound(363);
Announce( "ROBBER", player, 0 );
    }
    break;
    case 2:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( -1421.0, -760.0, -100.0 );
player.SetCameraPos(Vector(-1421.0, -760.0, 40.0),Vector(-1435.0, -833.0, 14.0));
player.PlaySound(361);
player.PlaySound(363);
 Announce( "MEXICAN", player, 0 );
    }
    break;
    case 3:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( -690.0, -1360.0, -100.0 );
player.SetCameraPos(Vector(-690.0, -1360.0, 11.0),Vector(-680.0, -1250.0, 35.0));
player.PlaySound(361);
player.PlaySound(363);
Announce( "SAILOR", player, 0 );
    }
    break;
    case 4:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( 409.0, 656.0, -100.0 );
player.SetCameraPos(Vector(409.0, 656.0, 40.0),Vector(428.0, 608.0, 17.0));
player.PlaySound(361);
player.PlaySound(363);
Announce( "VC CRUSADER", player, 0 );
    }
    break;
    case 5:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( 34.5, -1178.5, -100.0 );
player.SetCameraPos(Vector(34.5, -1178.5, 20.0),Vector(7.0, -1211.0, 9.4));
player.PlaySound(361);
player.PlaySound(363);
Announce( "SECRET SERVICE", player, 0 );
    }
break;
    case 6:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( 474.4, -1717.5, 56.2 );
player.SetCameraPos(Vector(474.4, -1717.5, 70.0),Vector(173.0, -1454.0, 26.0));
player.PlaySound(361);
player.PlaySound(363);
Announce( "SPECTATOR", player, 0 );
    }
break;
    case 7:
    {
SetCinematicBorder( player, true );
SetGreenScanLines( player, true );
SetSpawnPlayerPos( -836.0, -638.0, -100.0 );
player.SetCameraPos(Vector(-836.0, -638.0, 15.0),Vector(-866.0, -679.0, 1.0));
player.PlaySound(361);
player.PlaySound(363);
Announce( "COP", player, 0 );
    }
 }
}

Instead of "player.setCameraPos" , I was using both "SetSpawnCameraPos" and "SetSpawnCameraLook" and these in combination were spawning me as the incorrect skin for spawnscreen. So ditching those helped. But introduced this issue.

DarkRaZoR^

  • Full Member
  • VC:MP Battlefield Head Developer/KF Leader
  • Posts: 213
Re: Spawnscreen texture issue
« Reply #1,  »
If you set your camera position really far from the player, the game won't load the textures fully.

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 946
Re: Spawnscreen texture issue
« Reply #2,  »
Quote from DarkRaZoR^ on October 10th, 03:24 AM
If you set your camera position really far from the player, the game won't load the textures fully.
True.
Models won't load if you too far away.
Models load according to player, not to camera, so you must teleport player too

So when using player.SetCamera, you should also update the player.Pos too.

You can even hide player while camera is looking somewhere else, by using player.SetAlpha(0,0), then reset it by using player.SetAlpha(255,0), so it won't interfere with the view.

Gulk2

  • Newbie
  • Posts: 21
Re: Spawnscreen texture issue
« Reply #3,  »Last edited
Whats the difference between SetSpawnPlayerPos and player.Pos?

My players are positioned close by. Exact X Y

Xmair

  • Wiki Contributor
  • Posts: 879
Re: Spawnscreen texture issue
« Reply #4,  »
SpawnPlayerPos is the position where the player will be placed upon class selection. .Pos is a getter/setter for the player's position.
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

Gulk2

  • Newbie
  • Posts: 21
Re: Spawnscreen texture issue
« Reply #5,  »
Simply removed all the reoccuring SetSpawnPlayerPos and replaced with player.pos. It F***ing works! :D Fixed