|
Help please. modify a wdl code......
#334655
07/24/10 13:29
07/24/10 13:29
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
I would like to change this "sniper" effect into a magnifying glass effect. I have a detective that hunts for clues and i want to be able to press a button, maybe "m", and call this glass and it enlarges the item in the lens. can someone point me in the direction? Any help will be appreciated. here's what i have so far as code. borrowed from AUM 46(thanks George).
/////////////////////////////////////////////////////////////////////////////////
entity lens_ent
{
type = <sphere.mdl>;
x = 700; // 700 quants ahead of the view
y = 0; // and in the center of the view
z = 0; // on the y and z axis (x and y on the screen)
layer = 40; // give it a big layer
flags = visible; // and make it visible
}
/////////////////////////////////////////////////////////////////////////////////
view lens_view
{
layer = -10; // hide this view; we don't need to see it anyway
flags = visible; // enable the view
arc = -20; // give it a decent zoom factor (play with this value)
}
/////////////////////////////////////////////////////////////////////////////////
starter init_lens()
{
lens_view.pos_x = 0; // set the same position for the second (lens) view
lens_view.pos_y = 0;
lens_view.size_x = screen_size.x; // and the sam size with camera's size
lens_view.size_y = screen_size.y;
lens_view.bmap = bmap_for_entity (lens_ent, 0); // render the view on the lens_ent's bitmap (sphere.mdl's skin)
while (1)
{
lens_view.x = camera.x; // keep the lens view in sync with the camera
lens_view.y = camera.y;
lens_view.z = camera.z;
lens_view.pan = camera.pan;
lens_view.tilt = camera.tilt;
lens_view.roll = camera.roll;
wait (1);
}
}
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: Help please. modify a wdl code......
[Re: bart_the_13th]
#334844
07/25/10 16:10
07/25/10 16:10
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
the code is a working code, but when i start the level to glass starts with it and i set a on_m = init_lens; it just starts by itself. and the view on the lens isnt manified at all, its actuall smaller than the actual object. also the lens is behind the plBipeds head and it follows him around because its a camera view and i am using the 3rd person cam.
Last edited by Blink; 07/25/10 16:57. Reason: error
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: Help please. modify a wdl code......
[Re: alibaba]
#334860
07/25/10 16:56
07/25/10 16:56
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
thats not the problem. i typed that wrong. the() isnt there. my mistake in my post.
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: Help please. modify a wdl code......
[Re: alibaba]
#334868
07/25/10 17:50
07/25/10 17:50
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
ok..dont know how to do that, thats why i asked for help.
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: Help please. modify a wdl code......
[Re: bart_the_13th]
#335013
07/26/10 11:08
07/26/10 11:08
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP
Expert
|
OP
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
Thanks, Bart. I made the change, and now i get the empty pointer error message when it runs.
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."
|
|
|
|