ENTITY* flags

Posted By: NL_3DGS_n00b

ENTITY* flags - 06/15/08 19:19

Hi,

I am currently trying to use a muzzleflash model as an Entity for my gunfire script.
The muzzle entity is defined as:

Code:
ENTITY* ent_muzzle = {
      type = "muzzle_2.mdl";
      view = camera;
      x = 285;
		y = -27;
		z = -17;
		pan = 10;
		tilt = 10;
		roll = 0;
      flags2 = OVERLAY | VISIBLE | BRIGHT;
}


But how can I make the model transparent?
I was told to make it bright and transparent.
But when I use a transparent flag on the entity the engine trows back an error.

This is how the model looks like:



Does anyone know how to fix this in the script?
Posted By: Quad

Re: ENTITY* flags - 06/15/08 19:22

transparent flag is now TRANSLUCENT.
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 19:24

Thanks.
However, when I use there flags:

flags2 = OVERLAY | VISIBLE | BRIGHT | TRANSLUCENT;

The model is still black...
Posted By: PadMalcom

Re: ENTITY* flags - 06/15/08 20:02

Not every flag has to be set in "flags2", I think. Some still are defined in "flags".
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 20:04

Hey, your right.
I am using now:

flags = BRIGHT | TRANSLUCENT;
flags2 = VISIBLE;

Now it works fine.
Why can't I put everything in 1 flag?
Why are there flags and flags2?

Also, I have another question...
Hoe can I make the ENTITY* visible from somewhere else in the script?
This doesn't work:

set(ent_muzzle,VISIBLE);

Thanks.
Posted By: DJBMASTER

Re: ENTITY* flags - 06/15/08 20:42

try ent_muzzle.flags2 |= VISIBLE;
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 20:54

Works fine.
And how can I clear the visible flag?
Posted By: Quad

Re: ENTITY* flags - 06/15/08 21:08

ent_muzzle.flags2 &= ~VISIBLE;

Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 21:11

I dont get an error, but the ENTITY* won't disappear...
Posted By: DJBMASTER

Re: ENTITY* flags - 06/15/08 21:31

you can use ent_muzzle.flags |= INVISIBLE; to set it back to invisible.

Strange how VISIBLE is part of flags2 yet INVISIBLE is part of just flags?

ent_muzzle.flags2 &= ~VISIBLE; doesn't work for me either, hmm??

Why did conitec choose to use this method of setting flags. Personally i prefer the c-script method, it is soo easy and more code friendly in my opinion. Does it offer any extra benefits setting flags this way in lite-c then c-script? I can't see any.
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 21:46

Thank you very much.
One more question related to the visible and invisible.
This is voor my muzzle flash, so it has to be visible en then invisible when firing a shot.
Zo I use

ent_muzzle.flags2 |= VISIBLE;

end at the end of the code

ent_muzzle.flags |= INVISIBLE;

to hide it.
But when it hides and I fire again, I cant make it display again.
I think that's the problem of having to types of flags...

First I set flags2 to visible, and after that flags to invisible.
So visible is active, but it's been overrided by flags.
I think my solution is to clear invisible from the flags part, but how can I do that?
Posted By: Quad

Re: ENTITY* flags - 06/15/08 22:07

ent_muzzle.flags &= ~INVISIBLE; ??
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/15/08 22:20

Thank you guys very much.
It's solved now.
Posted By: NL_3DGS_n00b

Re: ENTITY* flags - 06/16/08 18:20

I have another question...
Is it possible to scale my ent_muzzle using script?
Posted By: Quad

Re: ENTITY* flags - 06/16/08 19:37

see

entity.scale_x
entity.scale_y
entity.scale_z

on manual.

http://www.conitec.net/beta/aentity-scale_x.htm
© 2023 lite-C Forums