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


Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related
kewl Offline
Junior Member

Posts: 12
Threads: 3
Joined: Sep 2010
Reputation: 0
#1
Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

None of my scripts ever work. Ever. I've tried atleast 40 of them, and none of them ever worked. I don't see what I could be doing wrong... I follow directions exactly... even when I'm just supposed to copy a script out and paste it in it won't work.

The only possible reason I could come up with as to why they never work is that it's just broken, if that can even happen.

Is there something I'm doing wrong?
(This post was last modified: 11-27-2010, 07:49 PM by kewl.)
11-27-2010, 05:26 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

(11-27-2010, 05:26 PM)kewl Wrote: None of my scripts ever work. Ever. I've tried atleast 40 of them, and none of them ever worked. I don't see what I could be doing wrong... I follow directions exactly... even when I'm just supposed to copy a script out and paste it in it won't work.

The only possible reason I could come up with as to why they never work is that it's just broken, if that can even happen.

Is there something I'm doing wrong?

Okay, now just take it easy. First, you got to show us an example of one of the scripts. Second, you need to show us what things that are in your custom story that you want to put into the script.

11-27-2010, 07:08 PM
Find
kewl Offline
Junior Member

Posts: 12
Threads: 3
Joined: Sep 2010
Reputation: 0
#3
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

(11-27-2010, 07:08 PM)Kyle Wrote: you got to show us an example of one of the scripts.

I'm trying to do a wake up script. I copied it out of another thread: http://www.frictionalgames.com/forum/thread-4626.html


This is what my script looks like:

void onStart()
{
void wakeUp();
}
void wakeUp () {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}




I can get into the map, but the script doesnt happen.
11-27-2010, 07:37 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#4
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

wheres void onstart and void on enter ?
11-27-2010, 07:53 PM
Find
kewl Offline
Junior Member

Posts: 12
Threads: 3
Joined: Sep 2010
Reputation: 0
#5
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

(11-27-2010, 07:53 PM)LoneWolf Wrote: wheres void onstart and void on enter ?

void onstart is in my last post.

I didn't copy void onEnter into the post
11-27-2010, 07:54 PM
Find
machosalad Offline
Junior Member

Posts: 38
Threads: 8
Joined: Oct 2010
Reputation: 0
#6
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

You shouldn't write "void wakeUp();" when you execute a function.
Instead write "WakeUp();"
11-27-2010, 08:14 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#7
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

does map work at all? post your full hps. you will have a small mistake... maybe missing/extra { or } (token). happened to me, i had two { in my hps and effected all scripts.
11-27-2010, 08:14 PM
Find
kewl Offline
Junior Member

Posts: 12
Threads: 3
Joined: Sep 2010
Reputation: 0
#8
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

(11-27-2010, 08:14 PM)LoneWolf Wrote: does map work at all? post your full hps. you will have a small mistake... maybe missing/extra { or } (token). happened to me, i had two { in my hps and effected all scripts.

void onStart()
{
wakeUp();
}
void wakeUp () {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
void OnEnter()
{

}

void OnLeave()
{

}
11-27-2010, 08:16 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#9
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

i dont see any problems. im not sure but i do this.




////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");
}
void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}






copy paste mine.
11-27-2010, 08:22 PM
Find
kewl Offline
Junior Member

Posts: 12
Threads: 3
Joined: Sep 2010
Reputation: 0
#10
RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related

(11-27-2010, 08:22 PM)LoneWolf Wrote: i dont see any problems. im not sure but i do this.




////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");
}
void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}






copy paste mine.

That worked.

Thank you, alot.

Is there something wrong with how I configured my .hps file? It looks different from yours.
11-27-2010, 08:26 PM
Find




Users browsing this thread: 1 Guest(s)