4 registered members (dBc, clonman, TipmyPip, 1 invisible),
19,019
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Help please. modify a wdl code......
[Re: Pappenheimer]
#335144
07/26/10 22:06
07/26/10 22:06
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
OP

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
thanks, no error, and it runs. now to make the lens work. the lens is zoomed, but it stays there. i want to press a button and the lens pops up. right now, it starts when the level starts. any suggestions?
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: exile]
#335193
07/27/10 08:19
07/27/10 08:19
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
in your main, you can do:
starter init_lens()
{
lens_view.visible = off;
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)
{
if(player)
{
if(key_m) { lens_view.visible = on; } else { lens_view.visible = off; }
lens_view.x = player.x; // keep the lens view in sync with the player
lens_view.y = player.y;
lens_view.z = player.z;
lens_view.pan = player.pan;
lens_view.tilt = player.tilt;
lens_view.roll = player.roll;
}
wait (1);
}
}
only thing you need to do now, is call the function on itself, not by a on_m call anymore. then it will be visible while pressing m and invisible when not. (I hope I got your question right). regards,
|
|
|
Re: Help please. modify a wdl code......
[Re: Helghast]
#335255
07/27/10 13:47
07/27/10 13:47
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
OP

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
thank you Helghast. I will give it a shot when i get home from work.
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: Blink]
#335335
07/27/10 20:15
07/27/10 20:15
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
OP

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
ok...maybe i didnt place it in my script right. are you saying, add it to my main in my level? what do i do with the rest of the script, just include it?
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: Blink]
#335540
07/29/10 00:34
07/29/10 00:34
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
OP

Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
not sure what i did wrong. the lens isnt invisible when the level runs. when i press m, it seems to magnify what i am near. but it still starts when the level runs. any ideas? maybe i am setting it up wrong.
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."
|
|
|
|