Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
invisible to camera #285605
08/19/09 09:57
08/19/09 09:57
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline OP
User
delinkx  Offline OP
User

Joined: Jul 2008
Posts: 553
Singapore
i have some map entities on my level in (WED). and 3 cameras. i would like to make some entities only visible to a particular camera. is tat possible ?

i can load those map entities at run time as well.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: invisible to camera [Re: delinkx] #285608
08/19/09 10:03
08/19/09 10:03
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
look at "genius" or "entity.parent" in the manual.

Last edited by DJBMASTER; 08/19/09 10:06.
Re: invisible to camera [Re: DJBMASTER] #285768
08/19/09 23:49
08/19/09 23:49
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
code straight out my project, i'm sure you'll figure the rest out wink
Code:
function enable_material_1(){
	if(render_view == view_player[0]){
		return(0);
	}else{
		return(1);
	}
}
function enable_material_2(){
	if(render_view == view_player[1]){
		return(0);
	}else{
		return(1);
	}
}
function enable_material_3(){
	if(render_view == view_player[2]){
		return(0);
	}else{
		return(1);
	}
}

create material events for each possible view combo

Code:
mtl_local[0].event = enable_material_1;
	mtl_local[1].event = enable_material_2;
	mtl_local[2].event = enable_material_3;
	mtl_local[0].flags = ENABLE_VIEW | ENABLE_TREE;
	mtl_local[1].flags = ENABLE_VIEW | ENABLE_TREE;
	mtl_local[2].flags = ENABLE_VIEW | ENABLE_TREE;

set the event per material

Code:
ent_sky[i].material = mtl_local[i];

apply each material per entities as required

Hope this helps

Re: invisible to camera [Re: MrGuest] #285776
08/20/09 03:17
08/20/09 03:17
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline OP
User
delinkx  Offline OP
User

Joined: Jul 2008
Posts: 553
Singapore
ok, DJB, that should be the one i need.

MrGuest, the one u are using is a nice trick as well. but using GENIUS gonna be simpler. let me give a shot at it.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: invisible to camera [Re: delinkx] #285881
08/21/09 02:39
08/21/09 02:39
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline OP
User
delinkx  Offline OP
User

Joined: Jul 2008
Posts: 553
Singapore
ok. i gave it a shot. i made 3 map entities. the camera hides the entity specified by:

camera4_view.genius = level1;

but am not able to attach 2 maps to the genius. i mean i want to hide 2 maps to 1 camera.

i tried:

camera4_view.genius = level1;
camera4_view.genius = level2;

it hides only level2. (last one.)

according to the data structure of genius, its ENTITY*. so only one can be attached at one time.

any workaround ?

Last edited by delinkx; 08/21/09 02:47.

A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: invisible to camera [Re: delinkx] #285917
08/21/09 15:18
08/21/09 15:18
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
as stated above, hiding multiple entities from multiple views isn't possible without this laugh (not that i could find anyway)


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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