Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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 Hey!
Now I'm home again and can continue scripting!
I tried it now, but , still doesn't work!
|
|
01-19-2012, 04:57 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
|
01-19-2012, 08:12 PM |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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 {
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);
}
|
|
01-19-2012, 08:25 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
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 {
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
{
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 |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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
{
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
but now it says : Main(23,1) : ERR : Unexpected token '{'
^^
Thank for your patience !
|
|
01-19-2012, 08:55 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
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
{
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
but now it says : Main(23,1) : ERR : Unexpected token '{'
^^
Thank for your patience ! 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 |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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 ^^ it is :/ but , the error is with "void", it's there it shows error '{' :/
|
|
01-19-2012, 09:04 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
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 ^^ 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 |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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! (
|
|
01-19-2012, 09:34 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
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! ( 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! ( 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 |
|
|