Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
simple Lens flares for sun #480201
05/26/20 13:52
05/26/20 13:52
Joined: Mar 2018
Posts: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
Hello.
Does somehone got an idea how to create lens Flares (in a simple way, without using Panels, but entitiy-sprites). I started something to test, but i can`t see anything :-(

ENTITY* lens_flare1 =
{
layer = 25;
type = "sun1.tga";
flags = PASSABLE | BRIGHT | TRANSLUCENT | NOFOG;// visible on screen from the start
view = camera; // same camera parameters as the default view
}


function place_sun(){
me = lens_flare1;
set(my, PASSABLE |SHOW| BRIGHT );// visible on screen from the start
vec_set(my.x,player.x);

VECTOR sstemp;
wait(10);
while(1){
set(lens_flare1,SHOW);
vec_set(lens_flare1.x,player.x); // put me on the Player Position for test
/*
vec_set(sstemp,player.x);//sun_pos
if (vec_to_screen(sstemp,camera) != NULL) // if sun position visible at screen
{
//lens_flare1.SHOW = ON;
set(my,SHOW);vec_set(my.x,player.x); // defined entity
sstemp.z = 200; // temp contains the sun screen position, give 200 quants depth
vec_set(my.x,sstemp.x);
rel_for_screen(my.x,camera); // now the lens flare is at the sun position
}*/
wait(1);
}
}


// AFTER LEVEL_LOAD i add These lines:
set(camera,SHOW);
place_sun();

But still no Flare. HELP!

Re: simple Lens flares for sun [Re: NicolaB] #480205
05/26/20 15:13
05/26/20 15:13
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey, take a look at this:
Lens Flare effects

Best regards.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

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