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
4 registered members (dBc, clonman, TipmyPip, 1 invisible), 19,019 guests, and 5 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
Page 2 of 2 1 2
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 Offline OP

Expert
Blink  Offline 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: Blink] #335168
07/27/10 05:43
07/27/10 05:43
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline
User
exile  Offline
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
When you say "pops up" do you mean you want the lens to be at one point and then, when pushing a button, the lens comes into view? If so, I actually have a MW2 style aiming script I just got to work for my weapons if you are interested.

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 Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
in your main, you can do:

Code:
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,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
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 Offline OP

Expert
Blink  Offline 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 Offline OP

Expert
Blink  Offline 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 Offline OP

Expert
Blink  Offline 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."
Page 2 of 2 1 2

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

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