GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
2
|
Waking up at intro
Hello I Know theres another thread about this but I tried that and I don't know what to do. I tried putting it in but it doesn't work comes up with 2 errors,
First one (3,16) :ERR :Expected ',' or ';'
Second one (31,1) :ERR :Unexpected token '{'
////////////////////////////
// Run first time starting map
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);
}
{
SetEntityPlayerInteractCallback("Mansion_5", "MonsterActivate", true);
AddUseItemCallback("", "LockedDoorKey_1", "LockedDoor_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Key_2", "Door_2", "UsedKeyOnDoor2", true);
AddEntityCollideCallback("Player", "Scare_1", "CollideScare_1", true, 1);
AddEntityCollideCallback("Player", "Doorslam_1", "CollideDoorslam_1", true, 1);
AddEntityCollideCallback("Player", "MonsterActivate", "CollideMonsterActivate", true, 1);
SetEntityPlayerInteractCallback("NoteActivate", "MonsterActivate2", true);
AddEntityCollideCallback("Frank_2", "Frank2Deactivate", "CollideFrank2Deactivate", true, 1);
AddUseItemCallback("", "Key_3", "Door_4", "UsedKeyOnDoor3", true);
AddEntityCollideCallback("Player", "DoorSlam_5", "CollideDoorSlam_5", true, -1);
AddEntityCollideCallback("Player", "Music_1", "CollideMusic_1", true, 1);
}
void MonsterActivate(string &in Entity)
{
SetEntityActive("Frank", true);
GiveSanityDamage(10, true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey_1");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_2", 0, false);
RemoveItem("Key_2");
}
void CollideScare_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("ScareDoor_1", true, true);
}
void CollideDoorslam_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("LockedDoor_1", true, true);
}
void MonsterActivate2(string &in Entity)
{
SetEntityActive("Frank_2", true);
GiveSanityDamage(30, true);
AddEnemyPatrolNode("Frank_2", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_12", 5.0, "idle_extra1");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_36", 0, "");
}
void CollideFrank2Deactivate(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("Frank_2",false);
}
void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_4", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_4", 0, false);
RemoveItem("TunnelOfDeath");
}
void CollideScare_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("ScareDoor_5", true, true);
}
void CollideMusic_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("general_piano01.ogg", true, 0.8, 3.0, 0,);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
///////////////////////////
//Run when leaving map
void OnLeave()
{
}
I Hope someone can help
Thank you
-Grey Fox
Current Project
Forgotten
|
|
07-26-2011, 04:36 AM |
|
Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Waking up at intro
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("Mansion_5", "MonsterActivate", true);
AddUseItemCallback("", "LockedDoorKey_1", "LockedDoor_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Key_2", "Door_2", "UsedKeyOnDoor2", true);
AddEntityCollideCallback("Player", "Scare_1", "CollideScare_1", true, 1);
AddEntityCollideCallback("Player", "Doorslam_1", "CollideDoorslam_1", true, 1);
AddEntityCollideCallback("Player", "MonsterActivate", "CollideMonsterActivate", true, 1);
SetEntityPlayerInteractCallback("NoteActivate", "MonsterActivate2", true);
AddEntityCollideCallback("Frank_2", "Frank2Deactivate", "CollideFrank2Deactivate", true, 1);
AddUseItemCallback("", "Key_3", "Door_4", "UsedKeyOnDoor3", true);
AddEntityCollideCallback("Player", "DoorSlam_5", "CollideDoorSlam_5", true, -1);
AddEntityCollideCallback("Player", "Music_1", "CollideMusic_1", true, 1);
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 MonsterActivate(string &in Entity)
{
SetEntityActive("Frank", true);
GiveSanityDamage(10, true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey_1");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_2", 0, false);
RemoveItem("Key_2");
}
void CollideScare_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("ScareDoor_1", true, true);
}
void CollideDoorslam_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("LockedDoor_1", true, true);
}
void MonsterActivate2(string &in Entity)
{
SetEntityActive("Frank_2", true);
GiveSanityDamage(30, true);
AddEnemyPatrolNode("Frank_2", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_12", 5.0, "idle_extra1");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("Frank_2", "PathNodeArea_36", 0, "");
}
void CollideFrank2Deactivate(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("Frank_2",false);
}
void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_4", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_4", 0, false);
RemoveItem("TunnelOfDeath");
}
void CollideScare_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("ScareDoor_5", true, true);
}
void CollideMusic_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("general_piano01.ogg", true, 0.8, 3.0, 0,);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
///////////////////////////
//Run when leaving map
void OnLeave()
{
}
You didn't put wakeUp in the OnStart set, and you also left your collidecallbacks out. Feel free to PM me or add me on Steam if you like. I'm not the best scripter, but I can do what I can.
Steam: Obliviator27
(This post was last modified: 07-26-2011, 05:10 AM by Obliviator27.)
|
|
07-26-2011, 05:09 AM |
|
GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
2
|
RE: Waking up at intro
Thank you so much, it worked I didn't know it ment where all my commands were. anyways I will add you on steam (im on 24/7) thank you once again.
-Grey Fox
Current Project
Forgotten
|
|
07-26-2011, 05:34 AM |
|
|