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
Script Help Screen Shake
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#11
RE: Screen Shake

(01-18-2012, 11:35 PM)SilentStriker Wrote:
(01-18-2012, 11:20 PM)Alento Wrote:
True change the 1 to a 0 on AddEntityCollideCallback Smile
Hey!

Now I'm home again and can continue scripting! Big Grin

I tried it now, but , still doesn't work! Sad

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
01-19-2012, 04:57 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#12
RE: Screen Shake

(01-19-2012, 04:57 PM)Alento Wrote:
(01-18-2012, 11:35 PM)SilentStriker Wrote: True change the 1 to a 0 on AddEntityCollideCallback Smile
Hey!

Now I'm home again and can continue scripting! Big Grin

I tried it now, but , still doesn't work! Sad
There is something wrong with the script x) can I see your whole script? and what's the name of the area the player walks in to?


01-19-2012, 08:12 PM
Find
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#13
RE: Screen Shake

(01-19-2012, 08:12 PM)SilentStriker Wrote: There is something wrong with the script x) can I see your whole script? and what's the name of the area the player walks in to?
(01-19-2012, 08:12 PM)SilentStriker Wrote: Think this is the one Smile
{
AddEntityCollideCallback("Player", "HangArea", "Hang_Man", true, 1);

AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void Hang_Man(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hangman", true);
}

void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

{
StartScreenShake(2, 2, 1, 0);
}



---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
01-19-2012, 08:25 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#14
RE: Screen Shake

(01-19-2012, 08:25 PM)Alento Wrote:
(01-19-2012, 08:12 PM)SilentStriker Wrote: There is something wrong with the script x) can I see your whole script? and what's the name of the area the player walks in to?
(01-19-2012, 08:12 PM)SilentStriker Wrote: Think this is the one Smile
{
AddEntityCollideCallback("Player", "HangArea", "Hang_Man", true, 1);

AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void Hang_Man(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("hangman", true);
}

void StartScreenShake(string &in asParent, string &in asChild, int alState);

{
StartScreenShake(2, 2, 1, 0);
}
Why are you using two collidecallbacks to the same area? :p

And you are using the wrong syntax on the Callback ^^

Try this Smile

{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}


(This post was last modified: 01-19-2012, 08:44 PM by SilentStriker.)
01-19-2012, 08:43 PM
Find
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#15
RE: Screen Shake

(01-19-2012, 08:43 PM)SilentStriker Wrote:
(01-19-2012, 08:25 PM)Alento Wrote:
Why are you using two collidecallbacks to the same area? :p

And you are using the wrong syntax on the Callback ^^

Try this Smile

{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}
hm.. xD i dunno, i thought it was like that Tongue

but now it says : Main(23,1) : ERR : Unexpected token '{'

^^

Thank for your patience ! Smile



---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
01-19-2012, 08:55 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#16
RE: Screen Shake

(01-19-2012, 08:55 PM)Alento Wrote:
(01-19-2012, 08:43 PM)SilentStriker Wrote: Why are you using two collidecallbacks to the same area? :p

And you are using the wrong syntax on the Callback ^^

Try this Smile

{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);

{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}
hm.. xD i dunno, i thought it was like that Tongue

but now it says : Main(23,1) : ERR : Unexpected token '{'

^^

Thank for your patience ! Smile
You need to put the AddEntityCollideCallback inside the brackets of void OnStart

We are here to help ^^


(This post was last modified: 01-19-2012, 08:58 PM by SilentStriker.)
01-19-2012, 08:57 PM
Find
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#17
RE: Screen Shake

(01-19-2012, 08:57 PM)SilentStriker Wrote:
(01-19-2012, 08:55 PM)Alento Wrote:
You need to put the AddEntityCollideCallback inside the brackets of void OnStart

We are here to help ^^
Big Grin it is :/ but , the error is with "void", it's there it shows error '{' :/



---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
01-19-2012, 09:04 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#18
RE: Screen Shake

(01-19-2012, 09:04 PM)Alento Wrote:
(01-19-2012, 08:57 PM)SilentStriker Wrote: You need to put the AddEntityCollideCallback inside the brackets of void OnStart

We are here to help ^^
Big Grin it is :/ but , the error is with "void", it's there it shows error '{' :/
The script should look like this

void OnStart()
{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}


(This post was last modified: 01-19-2012, 09:24 PM by SilentStriker.)
01-19-2012, 09:23 PM
Find
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#19
RE: Screen Shake

(01-19-2012, 09:23 PM)SilentStriker Wrote:
(01-19-2012, 09:04 PM)Alento Wrote:
The script should look like this

void OnStart()
{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}
it does! Sad(


---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
01-19-2012, 09:34 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#20
RE: Screen Shake

(01-19-2012, 09:34 PM)Alento Wrote:
(01-19-2012, 09:23 PM)SilentStriker Wrote: The script should look like this

void OnStart()
{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}
it does! Sad(
So nothings happening? see if you've done any typos or something


(01-19-2012, 09:34 PM)Alento Wrote:
(01-19-2012, 09:23 PM)SilentStriker Wrote: The script should look like this

void OnStart()
{
AddEntityCollideCallback("Player", "HangArea", "StartScreenShake", true, 1);
}

void StartScreenShake(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("hangman", true);
StartScreenShake(2, 2, 1, 0);
}
it does! Sad(
I found the problem remove the ; from (string &in asParent, string &in asChild, int alState);

oh and you might want to lower the screenshake to like (0.3f, 1, 1, 0);

(This post was last modified: 01-19-2012, 09:55 PM by SilentStriker.)
01-19-2012, 09:48 PM
Find




Users browsing this thread: 9 Guest(s)