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
3 registered members (TipmyPip, OptimusPrime, AndrewAMD), 14,882 guests, and 6 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
Entity Glow #369553
05/05/11 04:29
05/05/11 04:29
Joined: Apr 2011
Posts: 75
Malta
E
Ercoles Offline OP
Junior Member
Ercoles  Offline OP
Junior Member
E

Joined: Apr 2011
Posts: 75
Malta
I want an entity to glow when for example hit by something. The routine I am trying to use is:

MATERIAL* glow_on =
{
emissive_blue = 100;
emissive_green = 100;
emissive_red = 255;
power = 255;
}
MATERIAL* glow_off =
{
emissive_blue = 0;
emissive_green = 0;
emissive_red = 0;
power = 0;
}

function main()
{
...
entity.material=glow_on;
...
}

However nothing happens to the entity, it just stays the same. Can someone tell me how to make an entity glow.

Re: Entity Glow [Re: Ercoles] #369600
05/05/11 14:24
05/05/11 14:24
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
What is "entity" and how do you initialize it? And for gods sake, please use code tags!!11


Always learn from history, to be sure you make the same mistakes again...
Re: Entity Glow [Re: Ercoles] #369602
05/05/11 14:45
05/05/11 14:45
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: Ercoles
I want an entity to glow when for example hit by something.


Then you must set the entity's material to glow_on, when it is hit by something (e.g. via an event) and when it is not hit, then you use by default glow_off as entity material. Simple.

Re: Entity Glow [Re: HeelX] #369603
05/05/11 14:50
05/05/11 14:50
Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
xxxxxxx Offline
User
xxxxxxx  Offline
User

Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
HeelX he's talking about that the material isn't doing anything...


Es ist immer wieder erstaunlich, dass Leute die riesen Scripte schreiben die einfachsten sachen nicht können zb. mich mit SIEBEN x zu schreiben! tongue
Re: Entity Glow [Re: HeelX] #369613
05/05/11 15:38
05/05/11 15:38
Joined: Apr 2011
Posts: 75
Malta
E
Ercoles Offline OP
Junior Member
Ercoles  Offline OP
Junior Member
E

Joined: Apr 2011
Posts: 75
Malta
I used entity just to describe, it is an object created with med which is displayed with ent_create. What however I want to mean is that if I use:

entity.ambient=100;

The entity lights up, but I want only the red component to light up so I used the material above, however it does not work.

Last edited by Ercoles; 05/05/11 15:38.
Re: Entity Glow [Re: Ercoles] #369729
05/06/11 15:13
05/06/11 15:13
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
With your material definition it could barely be visible. The overall lighting of an entity is a bit more complicated. You can see the full documentation here: http://www.conitec.net/beta/lighting.htm

For a start try to set all other material parameters at 0 in order to remove the effects of lights in the environment.


Always learn from history, to be sure you make the same mistakes again...

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