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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fading entities
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#1
Fading entities

Hi

im trying to create guardian slime event, the only thing i miss in my script is that the slime fade and dont just spawn in your face, i understand it has something to do with Prop fade (I belive) and I've read the frictionals script for it but thats just way to hardcoded for me to understand, does anyone know the code by head that could post here?

Thanks.
06-16-2013, 02:40 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#2
RE: Fading entities

http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

void SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
(This post was last modified: 06-16-2013, 06:00 AM by DeAngelo.)
06-16-2013, 06:00 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#3
RE: Fading entities

I love how your link says my nickname "amn...functions" xD

06-16-2013, 09:14 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Fading entities

(06-16-2013, 06:00 AM)DeAngelo Wrote: http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

void SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades

Hey, this parameter is only useable by props. Props ARE NOT entities.

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-16-2013, 09:59 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Fading entities

Correct, but nearly all entities in the entities folder, are props. If it doesn't work, like with the hanging shirt, then you have to change its variables in the model editor from static, to object

Trying is the first step to success.
06-16-2013, 10:47 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Fading entities

(06-16-2013, 09:59 AM)JustAnotherPlayer Wrote: Hey, this parameter is only useable by props. Props ARE NOT entities.

All props are entities, but not every entity is a prop. Props are normally entities that can receive damage and therefore can "break."

Tutorials: From Noob to Pro
06-16-2013, 01:01 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Fading entities

Ah. Great! Thanks.

Trying is the first step to success.
06-16-2013, 01:51 PM
Find
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#8
RE: Fading entities

(06-16-2013, 06:00 AM)DeAngelo Wrote: http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

void SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades
..

Yes I've found that code before this post but I just get an error.

void slimefunc(string &in asParent, string &in asChild, int alState)

{
//SetEntityActive("slime_wall", true);
SetPropActiveAndFade("slime_wall", 0, 3);
PlaySoundAtEntity("", "guardian_activated3.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(9.0f, true);
}

This is me at least trying.
(This post was last modified: 06-16-2013, 02:24 PM by Hauken.)
06-16-2013, 02:17 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: Fading entities

Bool abActive.
It means you either put false, or true.
That's what the error probably says too

Trying is the first step to success.
06-16-2013, 07:41 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#10
RE: Fading entities

(06-16-2013, 07:41 PM)BeeKayK Wrote: Bool abActive.
It means you either put false, or true.
That's what the error probably says too

Really? The Engine Scripts page is really mis-leading.

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-17-2013, 12:46 AM
Find




Users browsing this thread: 4 Guest(s)