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 A bit confused. Help?
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#1
Sad  A bit confused. Help?

Okay so I scripted for a while, etc. And when I got to half, I though 'Hey, lets test it out!' But my game crashed and it displayed some weird errors I cannot seem to solve :c I would really appreciate if you could take a look and see what's wrong. Thanks!

This is the error it is displaying:

[Image: image211.png]


And this is the script:


Quote:void OnStart()
{
PlayMusic("04_amb.ogg", true, 0.3, 4, 1, true);
AddEntityCollideCallback("Player", "ScriptArea_1", "TimeToStartThisTrailerReally", true, 1);
}

void TimeToStartThisTrailerReally(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false); // Lolz you are gonna stay there for a while
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", "3", false);
StartScreenShake(0.7, 11, 4, 4);
AddTimer("SomethingToDoWithSounds", 4, "SomeRocksFallDown");
}

void SomeRocksFallDown(string &in asTimer)
{
PlaySoundAtEntity("ROCKSPLOSION", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("ICannotMakeUpNames", 0.1, "LETS_SPIN_THIS_SHIT");
}

void LETS_SPIN_THIS_SHIT(string &in asTimer)
{
PlaySoundAtEntity("HeartAttack", "react_pant.snt", "Player", 0, false);
StartPlayerLookAt("PlayerLooksBack", 0.3, 0, "");
AddTimer("", 0.4, "TurnBack");
}

void TurnBack(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksFront", 0.3, 0, "");
AddTimer("", 0.3, "LookRight"
}

void LookRight(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksRight", 0.4, 0, "");
AddTimer("", 0.2, "SighInRelief"
}

void SighInRelief(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("LookBack", 0.5, "");
PlaySoundAtEntity("Sigh", "react_breath_slow.snt", "Player", 0, false);
AddTimer("", 0.4, "WATCHOUT"
}

void WATCHOUT(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksFront", 0.4, 0, "");
AddTimer("", 0.4, "TooLate");
}

void TooLate(string &in asTimer)
{

}

Thanks in advance!

Keep in mind this script is still WIP so yeah I am aware that last void is literally empty and serves no purpose.
07-22-2012, 06:43 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: A bit confused. Help?

you forgot ); at:
AddTimer("", 0.2, "SighInRelief"
AddTimer("", 0.4, "WATCHOUT"
AddTimer("", 0.3, "LookRight"

so make it:
AddTimer("", 0.2, "SighInRelief");
AddTimer("", 0.4, "WATCHOUT");
AddTimer("", 0.3, "LookRight");

and you have at:
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", "3", false);

"3" should be just 3 so make it:
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", 3, false);

I hope this helps Big Grin

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
07-22-2012, 06:55 PM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#3
RE: A bit confused. Help?

Oh! How am I so stupid? Thanks! Big Grin
Now another error while doing that is bugging me Sad I haven't coded in a while so I must be really stupid about these now. Sorry!

Okay, Imagine all of those problems are fixed (can't be asked to paste the fixed code now) and lets look at this confusing error:

[Image: image212.png]


Got any ideas? Highly appreciated!
07-22-2012, 08:19 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: A bit confused. Help?

that's this part:
StartPlayerLookAt("LookBack", 0.5, "");

you forgot one part of the code/script you should have on more ""
you have it right in your other StartPlayerLookAt's
make it something like this:
StartPlayerLookAt("LookBack", 0.5, 0, "");

glad to help ;p

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 07-22-2012, 08:29 PM by Steve.)
07-22-2012, 08:28 PM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#5
RE: A bit confused. Help?

Oh my, thank you very much! Its fully working now! Smile
07-22-2012, 08:52 PM
Find
PixelHurricane Offline
Junior Member

Posts: 24
Threads: 8
Joined: Jul 2012
Reputation: 0
#6
RE: A bit confused. Help?

Just for the future, when it says it expected something look at the two numbers it give you. the first one is the vertical column, and the second is which character it is in that line.
by using the two coords along with what it was excepting you can usually figure it out.
07-24-2012, 04:08 AM
Find




Users browsing this thread: 2 Guest(s)