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
Completely new to scripting, stumped.
Shambles Offline
Junior Member

Posts: 32
Threads: 4
Joined: Jun 2012
Reputation: 4
#1
Completely new to scripting, stumped.

Before you say ANYTHING, please understand that I am from Germany, and my english is not as good. I am trying to make a custom story for my partner, I keep getting "fatal error unexpected end of script" or something. I have hardly anything on the script now.
I have tried following tutorial on wiki and youtube, am I placing wrong or something?? Very simple script so far, want to test out effects!

Someone tell me what I am doing wrong, please? :c I want to make this work.


void OnStart()
{
if(ScriptDebugOn())

{
void FadeImageTrailTo(5.4f 2.1f);

}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Once more, not so great at english, and really really new to scripting.
06-29-2012, 09:22 PM
Find
Demondays1 Offline
Member

Posts: 57
Threads: 7
Joined: Jun 2012
Reputation: 0
#2
RE: Completely new to scripting, stumped.

Anything on BOLD means its the problem

void OnStart()
{
if(ScriptDebugOn())

}

void FadeImageTrailTo(5.4f 2.1f)


{

}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Intel HD Lag fix: tiny.cc/pyv1gw
06-29-2012, 09:47 PM
Find
Shambles Offline
Junior Member

Posts: 32
Threads: 4
Joined: Jun 2012
Reputation: 4
#3
RE: Completely new to scripting, stumped.

Ithink I see...Uneeded extra brackets??
also now I am trying this- Everything worked until I added the trail function
It keeps telling me "unexpected ' "


{
AddEntityCollideCallback("Player", "push", "Push", true, 1);

}

void Push(string &in asParent, string &in asChild, int alState)

{
PlaySoundAtEntity("", "guardian_distant.snt", "push", 0, false);
AddPlayerBodyForce(30000, 0, 0, false);

void FadeImageTrailTo(5.4f 2.1f);


void FadeIn(10);
}
(This post was last modified: 06-29-2012, 10:12 PM by Shambles.)
06-29-2012, 09:55 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#4
RE: Completely new to scripting, stumped.

Yes, I think that's the problem. I think it indeed should be this.

void OnStart()
{
if(ScriptDebugOn())


{
void FadeImageTrailTo(5.4f 2.1f)
}

}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


I am not sure about this, seeing I've never used ScriptDebugOn nor FadeImageTrailTo.
Viel Glück und Spaß!
(This post was last modified: 06-29-2012, 10:16 PM by ApeCake.)
06-29-2012, 10:14 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Completely new to scripting, stumped.

You need to do research on how to define and call a function. C++ material should be enough for that.

Tutorials: From Noob to Pro
06-29-2012, 10:18 PM
Website Find
Shambles Offline
Junior Member

Posts: 32
Threads: 4
Joined: Jun 2012
Reputation: 4
#6
RE: Completely new to scripting, stumped.

I get the basic idea, I just have trouble knowing if brackets should be on something or not

If they need to be indented(?) if spacing is important

Adding functions isn't a big problem.
06-29-2012, 10:26 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#7
RE: Completely new to scripting, stumped.

spaces between anything doesn't matter. Functions and statements like if and for need brackets to determine what they should run.
06-29-2012, 10:31 PM
Find
Shambles Offline
Junior Member

Posts: 32
Threads: 4
Joined: Jun 2012
Reputation: 4
#8
RE: Completely new to scripting, stumped.

Alright!
Thanks to everyone for answering!
06-29-2012, 10:32 PM
Find




Users browsing this thread: 4 Guest(s)