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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting fatal errors?
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#71
RE: Scripting fatal errors?

Uh, I'm not sure how fog is supposed to work. I'm using these parameters:


void OnStart()
{
SetFogActive(true);
SetFogColor(0.03, 0.08, 0.20, 0.01);
SetFogProperties(10, 15, 1, false);
}

But I see no difference in-game. There's not much info on fog in the first place.
08-06-2013, 10:56 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#72
RE: Scripting fatal errors?

I see you did this:

SetFogColor(0.03, 0.08, 0.20, 0.01);

The last color, if I'm not wrong, is the alpha: With this value, is almost unseekable, so try setting it higher (like 0.2, 0.5, 1, etc).

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-06-2013, 11:55 AM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#73
RE: Scripting fatal errors?

(08-06-2013, 11:55 AM)The chaser Wrote: I see you did this:

SetFogColor(0.03, 0.08, 0.20, 0.01);

The last color, if I'm not wrong, is the alpha: With this value, is almost unseekable, so try setting it higher (like 0.2, 0.5, 1, etc).

Works like a charm, thanks!

Now I'm trying to make a cinematic sequence where the player starts moving forward automatically. I see that the script is "MovePlayerForward(float afAmount)", but I'm not sure how to make a timer that updates 60 times / second.
08-06-2013, 06:52 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#74
RE: Scripting fatal errors?

(08-06-2013, 06:52 PM)Rapsis Wrote:
(08-06-2013, 11:55 AM)The chaser Wrote: I see you did this:

SetFogColor(0.03, 0.08, 0.20, 0.01);

The last color, if I'm not wrong, is the alpha: With this value, is almost unseekable, so try setting it higher (like 0.2, 0.5, 1, etc).

Works like a charm, thanks!

Now I'm trying to make a cinematic sequence where the player starts moving forward automatically. I see that the script is "MovePlayerForward(float afAmount)", but I'm not sure how to make a timer that updates 60 times / second.

Simple:

void OnStart()
{
AddTimer("Move", 0.1 //This might change, depending of the speed//, "Moveyourass");
}

void Moveyourass (string &in asTimer)
{
MovePlayerForward(?);
AddTimer("Move", 0.1 //This might change, depending of the speed//, "Moveyourass");
}

I have practically zero knowledge about these functions, so well, you'll have to play with the values :|

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-06-2013, 08:29 PM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#75
RE: Scripting fatal errors?

Thanks!
Changing the values didn't do much, so I simply changed the player move speed.

Now, I'm trying to make a looping SOUND. I'm using PlaySoundAtEntity, and making "bool abSaveSound" true doesn't make it loop. Should I use a timer or something?

Also:

void OnStart()
{
AddTimer("FadeOutTime", 7.0, "FadeOut_1");
}

void FadeOut_1(string &in asTimer)
{
StartEffectFlash(10, 1.0, 999);
}

Doesn't make it fade out to white Sad
(This post was last modified: 08-06-2013, 11:01 PM by Rapsis.)
08-06-2013, 10:36 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#76
RE: Scripting fatal errors?

void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);



Fades the screen to white.




afFadeIn - time in seconds until screen is white


afWhite - determines to which percentage the screen fades to white (1.0 = completly white)


afFadeOut - time in seconds until screen is back to normal again

The wiki is your friend! Smile
if 999 is the seconds you have said to fade out, you'll have to wait 15 minutes or so to see it fade out, so, put something a lot lower (5.0, 10, depending on how you want it.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-07-2013, 10:14 AM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#77
RE: Scripting fatal errors?

(08-07-2013, 10:14 AM)The chaser Wrote: void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);



Fades the screen to white.




afFadeIn - time in seconds until screen is white


afWhite - determines to which percentage the screen fades to white (1.0 = completly white)


afFadeOut - time in seconds until screen is back to normal again

The wiki is your friend! Smile
if 999 is the seconds you have said to fade out, you'll have to wait 15 minutes or so to see it fade out, so, put something a lot lower (5.0, 10, depending on how you want it.


Thanks, but wow, that is kinda silly. It says "afFadeOut" is time in seconds until screen is back to NORMAL again, not full white.

But what about the looping sound? I can't get it to loop.
(This post was last modified: 08-07-2013, 11:16 AM by Rapsis.)
08-07-2013, 11:08 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#78
RE: Scripting fatal errors?

Open the sound's .snt file with something like Notepad++.

It should look something like this:

<SOUNDENTITY>  <SOUNDS>      <Main>          <Sound File="ambience_cave" />      </Main>  </SOUNDS>  <PROPERTIES Volume="0.3" MinDistance="20" MaxDistance="30" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="True" Loop="True" Use3D="False" Blockable="False" BlockVolumeMul="0.5" Priority="0" /></SOUNDENTITY>


Guess setting which setting to true makes the sound loop.Smile

[Image: Tv0YgQb.gif]
Image by BandyGrass
08-07-2013, 11:14 AM
Find
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#79
RE: Scripting fatal errors?

(08-07-2013, 11:14 AM)Kreekakon Wrote: Open the sound's .snt file with something like Notepad++.

It should look something like this:

<SOUNDENTITY>  <SOUNDS>      <Main>          <Sound File="ambience_cave" />      </Main>  </SOUNDS>  <PROPERTIES Volume="0.3" MinDistance="20" MaxDistance="30" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="True" Loop="True" Use3D="False" Blockable="False" BlockVolumeMul="0.5" Priority="0" /></SOUNDENTITY>


Guess setting which setting to true makes the sound loop.Smile

But I'm using a sound already included in-game, I don't think I should change it.
08-07-2013, 11:18 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#80
RE: Scripting fatal errors?

(08-07-2013, 11:18 AM)Rapsis Wrote: But I'm using a sound already included in-game, I don't think I should change it.
Well, you could make a copy of the sound file along with its .snt, give them different names, and put it along with your other custom story files. That way you can alter them without any fear of messing with the main game.

[Image: Tv0YgQb.gif]
Image by BandyGrass
08-07-2013, 11:21 AM
Find




Users browsing this thread: 3 Guest(s)