Something simple but doesn't work? -
WillyP - 19.01.2011
Sup, I made a little piece of code.
pawn Код:
#define CAMX -1817.9412
#define CAMY 769.3878
#define CAMZ 132.6589
#define CAMLX -1300.8754
#define CAMLY 68.0546
#define CAMLZ 129.4823
pawn Код:
MC = SetTimer("MoveCam",33,true);
pawn Код:
SetPlayerCameraPos(playerid,CAMLX,CAMLY,CAMLZ);
SetPlayerCameraLookAt(playerid,CAMX,CAMY,CAMZ);
pawn Код:
forward MoveCam(playerid);
public MoveCam(playerid)
{
SetPlayerCameraLookAt(playerid,CAMX+50,CAMY+50,CAMZ+2);
SetPlayerCameraPos(playerid,CAMLX+50,CAMLY+50,CAMLZ+2);
return 1;
}
That is
extremely simple. But the part I don't understand is; why doesn't the camera move?!
I try it on a blank Gamemode, still a frozen camera.
Re: Something simple but doesn't work? -
playbox12 - 19.01.2011
I don't get it, what do you want to accomplish? a moving camera at the spawn?
Anyway, I suppose you have it in a timer?
Re: Something simple but doesn't work? -
WillyP - 19.01.2011
Quote:
Originally Posted by playbox12
I don't get it, what do you want to accomplish? a moving camera at the spawn?
Anyway, I suppose you have it in a timer?
|
Oops, yeah I do, forgot to post the SetTimer.
Re: Something simple but doesn't work? -
playbox12 - 19.01.2011
Quote:
Originally Posted by [FU]Victious
Oops, yeah I do, forgot to post the SetTimer.
|
Alright, well I am not sure I will do some testing when I have time. Sorry.
Re: Something simple but doesn't work? -
WillyP - 19.01.2011
Quote:
Originally Posted by playbox12
Alright, well I am not sure I will do some testing when I have time. Sorry.
|
Don't worry. Hopefully I'll fathom this out.
Re: Something simple but doesn't work? -
Snowman12 - 19.01.2011
ive tryed to help but i get these errors try fixing these
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(12) : error 010: invalid function or declaration
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(14) : error 021: symbol already defined: "SetPlayerCameraPos"
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(25) : warning 203: symbol is never used: "MC"
ive put all your script in pawno are you sure that the whole scrippt there
Re: Something simple but doesn't work? -
WillyP - 19.01.2011
Quote:
Originally Posted by Snowman12
ive tryed to help but i get these errors try fixing these
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(12) : error 010: invalid function or declaration
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(14) : error 021: symbol already defined: "SetPlayerCameraPos"
C:\Users\Lyn\Documents\LCRP\gamemodes\LCRP.pwn(25) : warning 203: symbol is never used: "MC"
ive put all your script in pawno are you sure that the whole scrippt there
|
On a BLANK piece of code. Not your GM.
Re: Something simple but doesn't work? -
Macluawn - 19.01.2011
each 33miliseconds you are setting the camera pos to defined+50, without defining the new values.
put in the timer.
#undef x
#define x x+50
and so on.
I would use variables, the code could be smaller then.
Re: Something simple but doesn't work? -
WillyP - 19.01.2011
Quote:
Originally Posted by Macluawn
each 33miliseconds you are setting the camera pos to defined+50, without defining the new values.
put in the timer.
#undef x
#define x x+50
and so on.
I would use variables, the code could be smaller then.
|
I shall try that later. Thanks :P