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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Little script problem
Crypto Offline
Junior Member

Posts: 14
Threads: 4
Joined: Mar 2011
Reputation: 0
#1
Question  Little script problem

Can you guys help me out. I just cant get it to work. Angry

Script:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("mansion_3", "ScriptArea_1", "Func01", true, 1);
PlayMusic("06_amb.ogg", true, 1, 0, 0, true);
AddEntityCollideCallback("player", "ScriptArea_3", "viini", true, 1);

AddUseItemCallback("", "key_tower_1", "mansion_5", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity){
SetSwingDoorLocked("mansion_5", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
}

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

{
AddPropImpulse("mansion_3", 0, 0, 5, "World");
PlaySoundAtEntity("", "21_bang_door.snt", "mansion_3", 0, false);
PlaySoundAtEntity("", "22_start.ogg", "mansion_3", 0, false);
StartPlayerLookAt("mansion_3", 2, 2, "");
AddTimer("", 2, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
StopPlayerLookAt();
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
}

void viini(string &in asParent, string &in asChild, int alState)
PlaySoundAtEntity("", "05_event_bottles.ogg", "Player", 0, false);

}



////////////////////////////
// SetEntityActive("ParticleSystem_10", true); Run when entering map
void OnEnter()
{

}


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

}


Attached Files
.png   damnn.png (Size: 122.49 KB / Downloads: 108)
08-10-2011, 02:38 AM
Find
Endlvl Offline
Junior Member

Posts: 28
Threads: 4
Joined: Aug 2011
Reputation: 0
#2
RE: Little script problem

Ur missing a { after the void vinni() remember to use the errors to guide u to the solution I wnt check the rest but if u get an error the first number is the line where it happened and the second is the charecter then it tells u whaat ur missing or what it thinks isn't there it was telling u that the statement had no end
08-10-2011, 02:46 AM
Find
Crypto Offline
Junior Member

Posts: 14
Threads: 4
Joined: Mar 2011
Reputation: 0
#3
RE: Little script problem

Thanks Endlvl ! Its working again Smile
Map is starting now but when i walk trough scriptarea 3 i cant hear bottle event sound effect at all..Dodgy
(This post was last modified: 08-10-2011, 03:47 AM by Crypto.)
08-10-2011, 03:32 AM
Find
Endlvl Offline
Junior Member

Posts: 28
Threads: 4
Joined: Aug 2011
Reputation: 0
#4
RE: Little script problem

Remember to. Try using debug messages (and enableing them in the debug F1 menu) to test if an event is occuring. It may be the volume or some other things gl and happy scripting
08-10-2011, 03:57 AM
Find




Users browsing this thread: 2 Guest(s)