Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, AndrewAMD, Akow), 1,481 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | 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