Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 6,962 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Illuminating camera #386260
10/31/11 17:09
10/31/11 17:09
Joined: Sep 2009
Posts: 1,034
Budapest
Aku_Aku Offline OP
Serious User
Aku_Aku  Offline OP
Serious User

Joined: Sep 2009
Posts: 1,034
Budapest
I don't know how should i handle this:
I have a camera in the level and one entity.
The entity's albedo and ambient are zero. The camera's ambient is also zero.
When the camera approaches to the entity that is illuminated gradually by the camera.
I don't want an illuminating camera in the level space.
What should i do?

Re: Illuminating camera [Re: Aku_Aku] #386264
10/31/11 18:42
10/31/11 18:42
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I am not sure what you are asking, but if I understood you correctly... just attach this action to the entity you want to be illuminated:

Code:
action illuminate_me()
{
   my.ambient=0;
   var dist;

   while(1)
   {
      dist=vec_dist(my.x,camera.x);
      if(dist<100)
      {
         my.ambient=100-dist;
      }
      else
      {
         my.ambient=0;
      }
      wait(1);
   }
}



if the camera is more than 100 away from your entity the entity is not illuminated, if the camera is closer than 100 to the entity then the closer the camera is the more it will be illuminated


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Illuminating camera [Re: Carlos3DGS] #386268
10/31/11 19:50
10/31/11 19:50
Joined: Sep 2009
Posts: 1,034
Budapest
Aku_Aku Offline OP
Serious User
Aku_Aku  Offline OP
Serious User

Joined: Sep 2009
Posts: 1,034
Budapest
I am sorry. Not the camera but the entity what was attached to that does the illuminating effect somehow.
Edit:
The problem as turned out, i am moving an entity "A" toward to another entity "B".
Both of them have the ambient and albedo are zero.
Although the values are zero the "B" entity gets more and more light and gradually is illuminated more and more.
What could be the reason of this?

Last edited by Aku_Aku; 10/31/11 20:04.
Re: Illuminating camera [Re: Aku_Aku] #386269
10/31/11 20:25
10/31/11 20:25
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I cannot know if I dont see the code. But probably if it is getting brighter and brighter it is because you are adding light to it? Mabe you have something adding light to it in some loop, and you set the conditions wrong so its constantly adding light all the time...


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: Illuminating camera [Re: Carlos3DGS] #386271
10/31/11 20:53
10/31/11 20:53
Joined: Sep 2009
Posts: 1,034
Budapest
Aku_Aku Offline OP
Serious User
Aku_Aku  Offline OP
Serious User

Joined: Sep 2009
Posts: 1,034
Budapest
OK, now i know what was the reason.
I used an entity where i didn't specify set(ent,LIGHT) but i gave lightrange=300.
Frankly, i didn't think that will be act as a lamp. It was my fault.
Thank for the help.

Re: Illuminating camera [Re: Aku_Aku] #386279
10/31/11 22:37
10/31/11 22:37
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I wasn't understanding what you were trying to do, sorry


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1

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