2 registered members (AndrewAMD, Ayumi),
1,405
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
vertical mirror help....
#333347
07/15/10 21:00
07/15/10 21:00
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
ok guys... i found this script for a vertical mirror. how do i use it? how do you turn this into an action for a entity? i use c-script btw.
VIEW* mirror =
{
layer = 10;
}
function mirror_startup()
{
while (!player) {wait (1);}
camera.portal = mirror;
set (mirror, NOSHADOW); // suppress shadows in the mirror
set (mirror, NOPARTICLE); // suppress particles in the mirror
set (mirror, PORTALCLIP); // clip at portal plane
while (1)
{
proc_kill(4);
mirror.genius = camera.genius;
mirror.aspect = camera.aspect;
mirror.arc = -camera.arc;
mirror.x = camera.x;
mirror.y = camera.portal_y - (abs(camera.portal_y - camera.y));
mirror.z = camera.z;
mirror.pan = -camera.pan;
mirror.tilt = camera.tilt;
mirror.roll = camera.roll;
wait(1);
}
}
Last edited by Blink; 07/15/10 21:08.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertical mirror help....
[Re: badapple]
#333429
07/16/10 13:16
07/16/10 13:16
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
i think i copied the wrong code,lol. i guess i don't need a vertical mirror, i just thought it would be cool. Thanks Bad.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertical mirror help....
[Re: Blink]
#336943
08/07/10 03:05
08/07/10 03:05
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
can someone give me instructions on how to properly use the mirror function? i have A6:60 pro. i think this is the right code. how do you set up the mirror, which wall, etc?
//////////////////////////////////
//vertical mirror//////////////
/////////////////////////////
function mfx_mirror();
VIEW view_mirror { layer = -1; };
function mfx_mirror()
{
// do nothing if mirror is already running
if (view_mirror.visible == on) { return; }
view_mirror.visible = on;
view_mirror.noshadow = on; // suppress shadows in the mirror
view_mirror.nocull = on; // view through walls
view_mirror.portalclip = on; // clip at portal plane
vec_set(view_mirror.portal_x,vector(0,0,my.z + my.max_z)); // at top entity position
vec_set(view_mirror.pnormal_x,vector(0,0,1.0)); // horizontal plane
while (view_mirror.visible == on)
{
proc_late(); // place it at the end of the function list - the camera must be moved before
view_mirror.genius = camera.genius;
view_mirror.aspect = camera.aspect;
view_mirror.arc = camera.arc;
view_mirror.fog_start = camera.fog_start;
view_mirror.fog_end = camera.fog_end;
view_mirror.clip_far = camera.clip_far * 0.5;
view_mirror.clip_near = camera.clip_near * 2;
view_mirror.x = camera.x;
view_mirror.y = camera.y;
view_mirror.z = 2*view_mirror.portal_z-camera.z; // move the camera at its mirror position
view_mirror.pan = camera.pan;
view_mirror.tilt = -camera.tilt; // flip the vertical camera angle
view_mirror.roll = -camera.roll;
wait(1);
}
}
action mirrored
{
mfx_mirror();
}
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertical mirror help....
[Re: Blink]
#336956
08/07/10 06:01
08/07/10 06:01
|
Joined: Aug 2008
Posts: 482
bart_the_13th
Senior Member
|
Senior Member
Joined: Aug 2008
Posts: 482
|
Yes, it's an old mirror script. I made a vertical mirror effect using C-script a while ago(JuOn?). But it's gone along with my old HDD . B2T, to create a mirror effect in C Script, there are some 'rules': 1. The mirror surface must be flagged mirror(of course). And the other surface of the block should be flagged none. 2. The block should be the outer area(doh, how should I describe this). There must not any block or model behind/intersecting the block 3. Creating vertical mirror is a bit tricky since each mirror direction needs different code, which I forgot, sorry :D, but the point is, rather than changing the view_mirror.z, you change, view_mirror.x or view_mirror.y(depends on which direction the mirror is facing). The same applies to view_mirror.pan, tilt and roll
|
|
|
Re: vertical mirror help....
[Re: bart_the_13th]
#336959
08/07/10 06:21
08/07/10 06:21
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
i almost understand. so i can use a simple map entity for that, right? and the code i posted above should work for a6?
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertical mirror help....
[Re: bart_the_13th]
#336963
08/07/10 06:55
08/07/10 06:55
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
so, this code wont work for the vertical mirror?
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: vertical mirror help....
[Re: Blink]
#336964
08/07/10 07:23
08/07/10 07:23
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
I done something like this when I first started with A6 and from memory I think what I did was play around with tilt and either x or y eg:" + instead of -" but I think you get the idea . Try that anyway and see how you go, It may help you to solve your problem if anything.
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
Re: vertical mirror help....
[Re: Nidhogg]
#337871
08/14/10 00:40
08/14/10 00:40
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
does anyone understand how to change the x and or y to make this a vertical mirror. i guess thats why it isnt working? i just want a mirror effect in my room. can anyone explain the steps to make it work as well?
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
|