2 registered members (TipmyPip, 1 invisible),
18,787
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Simple mini-map in A7 (C-Lite)!
#239201
12/03/08 08:24
12/03/08 08:24
|
Joined: Sep 2008
Posts: 9
Staakman
OP
Newbie
|
OP
Newbie
Joined: Sep 2008
Posts: 9
|
I use the following scripts in A7 (C-Lite):
VIEW* top_view =
{
layer = 15;
pos_x = 0;
pos_y = 0;
size_x = 200;
size_y = 150;
//arc = 60;
flags = VISIBLE;
x = Entplayer.x // should be player.x (dosn't work)
y = Entplayer.y; // should be player.y (dosn't work)
z = 900; // playing with this
//pan = 400;
}
function init_topcam()
{
while (player != NULL)
{
vec_set(top_view.x,playerEnt.x);
vec_set(top_view.y,playerEnt.y);
vec_set(top_view.z,playerEnt.z);
//top_view.y = playerEnt.y;
wait (1);
}
}
// In a while(1) loop
init_topcam();
But it doesn't matter if I change the view.x, with other words the view position does not change. Apperently I'm not able to change camera position with view.x? Any help is apreciated!
Last edited by Staakman; 12/03/08 08:53.
|
|
|
Re: Simple mini-map in A7 (C-Lite)!
[Re: Staakman]
#239202
12/03/08 08:30
12/03/08 08:30
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
you cant use variables in view definition i guess.
and for the init_topcam make sure player is not null.
3333333333
|
|
|
Re: Simple mini-map in A7 (C-Lite)!
[Re: Staakman]
#239206
12/03/08 09:01
12/03/08 09:01
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
set it to 0 first then your init_topcam already sets it to players position.
3333333333
|
|
|
Re: Simple mini-map in A7 (C-Lite)!
[Re: Staakman]
#239210
12/03/08 09:30
12/03/08 09:30
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
VIEW* topcam = {
layer = 99;
pos_x = 10;
pos_y = 10;
size_x = 200;
size_y = 200;
ambient = 10;
arc = 120;
genius = NULL;
flags = VISIBLE|ISOMETRIC;
}
function handle_topcam(){
topcam.x = my.x;
topcam.y = my.y;
topcam.z = my.z+300;
topcam.tilt = -90;
}
action Thirdp(){
var camdist = 200; //camera distance
camera.tilt = -45;
while(1){
camera.pan = my.pan;
handle_topcam();
camera.x = my.x-camdist*cosv(camera.pan);
camera.y = my.y-camdist*sinv(camera.pan);
my.pan -= 10*time_step*mouse_force.x;
camera.z = my.z+camdist;
camdist+=mickey.z*time_step;
c_move(me,vector((key_w-key_s)*10*time_step,0,0),nullvector,GLIDE);
wait(1);
}
}
void main(){
level_load("asdasd.wmb");
ent_create("dummy.mdl",nullvector,Thirdp);
wait(1);
}
works well for me.
3333333333
|
|
|
Re: Simple mini-map in A7 (C-Lite)!
[Re: Quad]
#239211
12/03/08 09:42
12/03/08 09:42
|
Joined: Sep 2008
Posts: 9
Staakman
OP
Newbie
|
OP
Newbie
Joined: Sep 2008
Posts: 9
|
thanks! works now  Only thing that gave a bug was |ISOMETRIC; So removed it and then it worked. :P Kinda interested now in how I can get |ISOMETRIC working do. EDIT: |ISOMETRIC will be implemented in the new release.
Last edited by Staakman; 12/03/08 09:45.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|