Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Simple mini-map in A7 (C-Lite)! #239201
12/03/08 08:24
12/03/08 08:24
Joined: Sep 2008
Posts: 9
S
Staakman Offline OP
Newbie
Staakman  Offline OP
Newbie
S

Joined: Sep 2008
Posts: 9
I use the following scripts in A7 (C-Lite):
Code:
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! smile

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 Offline
Senior Expert
Quad  Offline
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: Quad] #239204
12/03/08 08:38
12/03/08 08:38
Joined: Sep 2008
Posts: 9
S
Staakman Offline OP
Newbie
Staakman  Offline OP
Newbie
S

Joined: Sep 2008
Posts: 9
while (player == NULL) {wait (1);} // I do this

How would I set a view to the players position then?

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 Offline
Senior Expert
Quad  Offline
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: Quad] #239208
12/03/08 09:11
12/03/08 09:11
Joined: Sep 2008
Posts: 9
S
Staakman Offline OP
Newbie
Staakman  Offline OP
Newbie
S

Joined: Sep 2008
Posts: 9
true, but it doesn't really mather on what's set in the top_view itself (changed it do). But according to A7 yo should be able to change the position with x,y.z. Apperently I'm doing something wrong =(

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 Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Code:
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
S
Staakman Offline OP
Newbie
Staakman  Offline OP
Newbie
S

Joined: Sep 2008
Posts: 9
thanks! works now smile

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.
Re: Simple mini-map in A7 (C-Lite)! [Re: Staakman] #239213
12/03/08 09:57
12/03/08 09:57
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey

Last edited by Quadraxas; 12/03/08 09:57.

3333333333

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1