Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Activate/Deactivate Static Objects etc.
Author Message
mansarde Offline
Junior Member

Posts: 42
Joined: Sep 2010
Reputation: 0
Post: #11
RE: Activate/Deactivate Static Objects etc.

(09-20-2010 09:40 PM)Armored Cow Wrote:  Ok, I guess that makes sense.

Thanks for the help Smile

No problem, just giving back to the community. Smile

Edit:
One thing I forgot: If you just make a mesh to an entity then it has no collision.
I.e. everything (including the player) will pass through it. So you have to make a collision box as well.
To see how that works, just open an existing entity.
09-20-2010 09:42 PM
Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 545
Joined: Jun 2009
Reputation: 10
Post: #12
RE: Activate/Deactivate Static Objects etc.

(09-20-2010 04:54 PM)jens Wrote:  A light should be possible to set to active false, if that is not working then something strange is going on. At least it works for pointlights and spotlights. If it is not workingin the editor you can use the script FadeLight to fade a light to for example black (0,0,0,0) and it will not be visible.

Active is broken for Point Lights. At least in my levels. I have to loop through my lights and do SetEntityActive("name", false); in OnStart to turn them off.

[Image: 16455.png]
09-20-2010 10:48 PM
Find all posts by this user Quote this message in a reply
mansarde Offline
Junior Member

Posts: 42
Joined: Sep 2010
Reputation: 0
Post: #13
RE: Activate/Deactivate Static Objects etc.

Alright, I came around to play with the lights and still the inactive checkbox in the editor doesn't seem to do anything for lights (at least for pointlights). So I can confirm what MulleDK19 says.
But it doesn't even work for me if I deactivate the Pointlight OnStart.
This...
void OnStart()
{
[...other code...]

SetEntityActive("PointLight_1", false);
}
...does not deactivate the Pointlight ingame.
Just for details:
The only thing I changed apart from its position is its radius (set to 9) and its color.

What DOES work though is the tip with the FadeLightTo() function.
Wwhen I use this...
FadeLightTo("PointLight_1", 0.0f, 0.0f, 0.0f, 0.0f, 9.0f, 0.1f);
... in OnStart(), then the Pointlight is effectively switched off at the beginning.
Turning it on again this way works as well:
FadeLightTo("PointLight_2", 0.604f, 0.516f, 0.155f, 1.0f, 9.0f, 0.1f);

So I guess I'll just have to use a workaround for now. Or I'm doing something wrong which I just can't see?
Because what MulleDK19 did, oddly doesn't seem to work for me. Huh
09-21-2010 06:45 AM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #14
RE: Activate/Deactivate Static Objects etc.

It's SetLightActive if you want to disabled them like an entity I think.
09-21-2010 07:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #15
RE: Activate/Deactivate Static Objects etc.

(09-21-2010 07:31 AM)jens Wrote:  It's SetLightActive if you want to disabled them like an entity I think.

Could be worth a try, but it's not in the wiki in the list of the Script Functions.

09-21-2010 10:29 AM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #16
RE: Activate/Deactivate Static Objects etc.

SetLightVisible then... It's not easy trying to remember them all!
09-21-2010 10:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
mansarde Offline
Junior Member

Posts: 42
Joined: Sep 2010
Reputation: 0
Post: #17
RE: Activate/Deactivate Static Objects etc.

(09-21-2010 07:31 AM)jens Wrote:  It's SetLightActive if you want to disabled them like an entity I think.

(09-21-2010 10:54 AM)jens Wrote:  SetLightVisible then... It's not easy trying to remember them all!

Ah dammit, I should've looked for that in the list myself.
Sorry for asking an unnecessary question, but thanks for answering anyway!
The Mod Tools you've released are really easy to use and make complicated stuff easy to handle. Smile
---------------------------------

EDIT:
Ok, there's one question I have which is not really related to the thread in particular, but to angelscripting in general:
What exactly does the prefix "a" as in "as", "al", "ab", etc. mean?
Example:
void  PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
I guess the second letter represents the respective type, like bool for abLoop, or float for afFadeTime.

But what does the first letter ("a") stand for?
Does it just mean AngelScript?
So, for example, abLoop would mean: "This is an angelscript boolean named Loop"?
09-21-2010 02:09 PM
Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #18
RE: Activate/Deactivate Static Objects etc.

You are probably right about your guess.
as = string
ab = boolean
af = float
and so on.

09-21-2010 02:35 PM
Find all posts by this user Quote this message in a reply
gosseyn Offline
Member

Posts: 63
Joined: Sep 2010
Reputation: 1
Post: #19
RE: Activate/Deactivate Static Objects etc.

yes, i think you got it right, i read it like that too, means angel+type.
09-21-2010 02:35 PM
Find all posts by this user Quote this message in a reply
Equil Offline
Member

Posts: 94
Joined: Sep 2010
Reputation: 0
Post: #20
RE: Activate/Deactivate Static Objects etc.

I actually wanted to know how to activate that red goo stuff like it does in the main game, but I can't seem to find any entities of it in the editor, only static objects, and even there I can't find all the models of it I remember seeing.. can someone verify this?
09-25-2010 05:26 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)