Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help A bit confused. Help?
Author Message
Zjurc Offline
Junior Member

Posts: 37
Joined: Jan 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Steve Offline
Member

Posts: 168
Joined: Jun 2012
Reputation: 6
Post: #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%
Crew searching.
07-22-2012 06:55 PM
Find all posts by this user Quote this message in a reply
Zjurc Offline
Junior Member

Posts: 37
Joined: Jan 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Steve Offline
Member

Posts: 168
Joined: Jun 2012
Reputation: 6
Post: #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%
Crew searching.
(This post was last modified: 07-22-2012 08:29 PM by Steve.)
07-22-2012 08:28 PM
Find all posts by this user Quote this message in a reply
Zjurc Offline
Junior Member

Posts: 37
Joined: Jan 2012
Reputation: 0
Post: #5
RE: A bit confused. Help?
Oh my, thank you very much! Its fully working now! Smile
07-22-2012 08:52 PM
Find all posts by this user Quote this message in a reply
PixelHurricane Offline
Junior Member

Posts: 24
Joined: Jul 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)