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
How to use Effect_Screen_Start?
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#1
How to use Effect_Screen_Start?

I'm trying to use Effect_Screen_Start to fade an image on the screen, but I have only been able to produce a pure black screen, or a solid color if I add an illumination image to the material. this is the code I am using for my test:

Effect_Screen_Start("wholeroom1.png",cVector2f(0.5,0.5),cVector2f(1920,1080),1.0,1.0,1.5,1.0);

and attached is the .mat file.


I have tried changing the resolution, adding alpha channel, changing the vector position, changing the image type(tried .dds,.png, .jpg.), with mip maps and without, using FG images, so I really just don't know what it is I need to do to get this working.

EDIT: and before someone asks, I did try both with and without the ".png" after the name
EDIT: forgot to include the image file in the zip, now fixed so it includes both the .mat and the .zip


Attached Files
.zip   wholeroom1.zip (Size: 1.13 MB / Downloads: 108)
(This post was last modified: 01-04-2016, 06:46 AM by WALP.)
01-03-2016, 11:34 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#2
RE: How to use Effect_Screen_Start?

Every example of Effect_Screen_Start that I can find in FG scripts uses a ".mat" file and the declaration for the function in hps_api.hps calls the first parameter "asMaterial", so I'm guessing that you need to first create a material of the image with the MaterialEditor and use that.
01-04-2016, 12:09 AM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#3
RE: How to use Effect_Screen_Start?

(01-04-2016, 12:09 AM)Abion47 Wrote: Every example of Effect_Screen_Start that I can find in FG scripts uses a ".mat" file and the declaration for the function in hps_api.hps calls the first parameter "asMaterial", so I'm guessing that you need to first create a material of the image with the MaterialEditor and use that.
already tried that, and yes it is required, since without it wont even show the solid black/illuminated color on the screen.

But how do I make so it shows the actual texture instead of a solid color is my issue

EDIT: On another note could you tell me where you found those examples in their scripts? they would help out a lot in comparing what I am doing different
(This post was last modified: 01-04-2016, 06:45 AM by WALP.)
01-04-2016, 06:42 AM
Find
Aaron Offline
Frictional Games

Posts: 20
Threads: 0
Joined: Aug 2013
Reputation: 6
#4
RE: How to use Effect_Screen_Start?

Like Abion47 said, the "texture" must be in a material. The material should usually be of the translucent type so it can fade.

Example:
Effect_Screen_Start("nameofmaterial.mat", cVector2f(0.5, 0.5), cVector2f(1.8, 1.8), 1, 0.4f, 0.2f, 0.6f);

Effect_Screen_Start("nameofmaterial.mat", cVector2f(positionX, positionY), cVector2f(sizeX, sizeY), Alpha, fadeInTime, stayTime, fadeOutTime);

Artist.
Twitter: @aaronjclifford
01-04-2016, 09:22 AM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: How to use Effect_Screen_Start?

(01-04-2016, 09:22 AM)Aaron Wrote: Like Abion47 said, the "texture" must be in a material. The material should usually be of the translucent type so it can fade.

Example:
Effect_Screen_Start("nameofmaterial.mat", cVector2f(0.5, 0.5), cVector2f(1.8, 1.8), 1, 0.4f, 0.2f, 0.6f);

Effect_Screen_Start("nameofmaterial.mat", cVector2f(positionX, positionY), cVector2f(sizeX, sizeY), Alpha, fadeInTime, stayTime, fadeOutTime);

Thanks, it works now!
01-04-2016, 05:19 PM
Find




Users browsing this thread: 1 Guest(s)