Moving Camera from Point A to Point B -
anumaz - 18.03.2011
Hey!
Basically I have been searching for one hour "how to move a camera(like, flying with just a camera, but from specific points) from Point A(x,y,z) to Point B(x,y,z), on the Connect (where you login,register) screen"
(Yes the NPC is connected, NPC name: onconnectfly)
pawn Код:
public OnPlayerConnect(playerid)
{
new stringid[44];
format(stringid, sizeof(stringid), "onconnectfly");
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, stringid);
return 1;
}
My idea: Having a NPC path, that you spectate but you put yourself in another virtual world so you can't see the NPC, so you just fly around on a specific path.
The problem: I can't get it to work, it gives me an error : error 035: argument type mismatch (argument 2) (on the line of PlayerSpectatePlayer)
Any help
EDIT: Of course if there is any other way to do what I want, it would be veeeery appreciated. Because the NPC going through my login system is bugging me haha
Re: Moving Camera from Point A to Point B -
maramizo - 18.03.2011
It's
pawn Код:
PlayerSpectatePlayer(playerid, /*NPC ID HERE*/);
Re : Moving Camera from Point A to Point B -
anumaz - 18.03.2011
Yeah but how do you get the NPC ID
Re: Moving Camera from Point A to Point B -
antonio112 - 18.03.2011
Well, go in game and do a /goto ID ... and search for your NPC ID...
Re: Moving Camera from Point A to Point B -
maramizo - 18.03.2011
Well whenever you create the NPC, make him the first thing that spawns, so it's always ID 0.
Re: Moving Camera from Point A to Point B -
antonio112 - 18.03.2011
If you have only 1 NPC, yes but what about if you have more ?
I have 14 NPC's in my gamemode now so whenever I join my server, my ID is 15.
Re: Moving Camera from Point A to Point B -
iggy1 - 18.03.2011
Two ways i can think off hand (i havent realy worked with npcs before).
pawn Код:
#define MAX_BOTS (15)
new BotIDS[MAX_BOTS] = {INVALID_PLAYER_ID, ...};//array to store npc ids
public OnPlayerConnect(playerid)
{
static
BotCount;
if(IsPlayerNPC(playerid))
{
BotIDS[BotCount] = playerid;
BotCount++;
}
return 1;
}
EDIT: The other way was very poor.