Icaab2608
Member
Posts: 85
Threads: 37
Joined: Jul 2013
Reputation:
0
|
Script
When you load my level,some reason the player,does not look at second of the scripts.
Explain, in what an error script:
void OnStart() { SetEntityPlayerInteractCallback("potion_health_1", "Slime", true); AddEntityCollideCallback("crowbar_joint_1", "AreaBreakBoards_1", "BreakBoards", true, 1); AddEntityCollideCallback("Player", "AreaCrowBarQuest_1", "AddCrowBarQuest", true, 1); AddUseItemCallback("crowbar", "crowbar", "chest_of_drawers_simple_new_1", "AttatchCrowbar", true); FadeOut(0); ClearSavedMaps(); SetPlayerHealth(40); SetPlayerActive(false); MovePlayerHeadPos(-1.25, 0, 0, 5, 0.0f); StartPlayerLookAt("lamp_wall_flour_1", 9, 9, ""); AddTimer("Look1", 4, "Look1"); AddTimer("FadeIn", 2, "FadeIn"); } void Broken_Castle(string &in asEntity) { SetPropHealth("prison_1", 0.0f); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); GiveSanityDamage(5.0f, true); } void Broken_Castle2(string &in asEntity) { SetPropHealth("prison_2", 0.0f); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); GiveSanityDamage(5.0f, true); } void Slime(string &in item) { SetPropActiveAndFade("slime_6way_trollface_1", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_1", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_2", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_3", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_4", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_5", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_6", true, 1.2f); SetPropActiveAndFade("slime_pile_trollface_7", true, 1.2f); SetPropActiveAndFade("slime_6way_trollface_2", true, 1.2f); SetPropActiveAndFade("slime_6way_trollface_3", true, 1.2f); SetPropActiveAndFade("sslime_6way_trollface_4", true, 1.2f); SetPropActiveAndFade("slime_6way_trollface_5", true, 1.2f); SetPropActiveAndFade("slime_6way_trollface_6", true, 1.2f); SetPropActiveAndFade("slime_3way_trollface_1", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_1", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_2", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_3", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_4", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_5", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_6", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_7", true, 1.2f); SetPropActiveAndFade("SlimeDamageArea_8", true, 1.2f); PlayMusic("trolls.ogg", true, 2.0, 0.0, 0, true); } void AttatchCrowbar(string &in asItem, string &in asEntity) { SetEntityActive("crowbar_joint_1", true);
SetPlayerActive(false);
StartPlayerLookAt("crowbar_joint_1", 2, 2, "");
PlaySoundAtEntity("", "player_crouch.snt", "crowbar_joint_1", 0, false); RemoveItem(asItem); } void BreakBoards(string &in asParent, string &in asChild, int alState) { SetEntityActive("crowbar_broken_1", true); SetEntityActive("crowbar_joint_1", false); CompleteQuest("crowbarquest", "CrowBarQuest"); GiveSanityBoost(); SetEntityActive("chest_of_drawers_simple_new_1", false); SetEntityActive("chest_of_drawers_simple_1", true); StopPlayerLookAt(); SetPlayerActive(true); } void FadeIn(string&in asTimer) { SetPlayerSanity(10); FadeIn(2); PlaySoundAtEntity("", "react_sigh", "Player", 0, false); }
void Look1(string&in asTimer) { SetPlayerSanity(30); StartPlayerLookAt("Look1", 1, 1, ""); AddTimer("Look2", 3.0f, "Look2"); PlaySoundAtEntity("", "player_climb", "Player", 0, false); }
void Look2(string&in asTimer) { PlaySoundAtEntity("", "react_breath", "Player", 0, false); StartPlayerLookAt("Look2", 2, 3, ""); MovePlayerHeadPos(0, 0, 0, 5, 0.0f); AddTimer("Look3", 2.5f, "Look3"); }
void Look3(string&in asTimer) { StartPlayerLookAt("Look3", 3, 5, ""); MovePlayerHeadPos(0, -0.5, -0.3, 1, 0.0f); AddTimer("Look4", 0.5f, "Look4"); PlaySoundAtEntity("", "player_climb", "Player", 0, false); }
void Look4(string&in asTimer) { StartPlayerLookAt("Look4", 1, 1, ""); AddTimer("stoplooking", 1.5f, "stoplooking"); MovePlayerHeadPos(0, 0, 0, 5, 0.0f); PlaySoundAtEntity("", "player_climb", "Player", 0, false); AutoSave(); }
void stoplooking(string&in asTimer) { StopPlayerLookAt(); SetPlayerActive(true); } void OnEnter() { SetEntityPlayerInteractCallback("potion_health", "potion_health", true); SetEntityPlayerInteractCallback("Health", "Health", true); AddEntityCollideCallback("Player", "Damage", "Damage", true, 1); AddEntityCollideCallback("male_arm_trol_1", "Path", "Path", true, 1); AddPlayerHealth(80); AddUseItemCallback("", "key_tower", "level_hub_1", "OpenDoor", true); } void Test_Door(string &in asItem, string &in asEntity) { SetSwingDoorLocked("level_hub_1", false, true); PlaySoundAtEntity("", "unlock_door", "level_hub_1", 0, false); RemoveItem("key_tower"); SetEntityActive("male_arm_trol_1", true); AddEnemyPatrolNode("male_arm_trol_1", "MaleArmPath_1", 1, "run"); } void Health(string &in item) { RemoveItem("asItem"); SetPlayerHealth(100); SetEntityActive("Damage", true); SetSwingDoorClosed("prison_1", true, true); SetSwingDoorClosed("prison_2", true, true); PlaySoundAtEntity("", "door_prison_open.snt", "Player", 0, false); } void potion_health(string &in item) { GiveItemFromFile("key_tower", "key_tower.ent"); GiveItemFromFile("potion_health_empty", "potion_health_empty.ent"); RemoveItem("asItem"); } void Damage(string &in asParent, string &in asChild, int alState) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_1"); } void Timer_1(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_2"); } void Timer_2(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_3"); } void Timer_3(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_4"); } void Timer_4(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_5"); } void Timer_5(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_6"); } void Timer_6(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_7"); } void Timer_7(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_8"); } void Timer_8(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_9"); } void Timer_9(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_10"); } void Timer_10(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_11"); } void Timer_11(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_12"); } void Timer_12(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_13"); } void Timer_13(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_14"); } void Timer_14(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_15"); } void Timer_15(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_16"); } void Timer_16(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_17"); } void Timer_17(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_18"); } void Timer_18(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_19"); } void Timer_19(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_20"); } void Timer_20(string &in asTimer) { GivePlayerDamage(2.0f, "BloodSplat", false, false); AddTimer("", 2.0f, "Timer_death"); } void Timer_death(string &in asTimer) { GivePlayerDamage(40.0f, "BloodSplat", false, false); } void Path(string &in asParent, string &in asChild, int alState) { AddEnemyPatrolNode("male_arm_trol_1", "MaleArmPath_2", 0, "run"); } void OnLeave() { StopMusic(3.0, 0); }
[img] [/img]
|
|
07-19-2013, 09:03 AM |
|
No Author
Posting Freak
Posts: 962
Threads: 10
Joined: Jun 2012
Reputation:
13
|
RE: Script
Does your other script works ?
|
|
07-19-2013, 10:19 AM |
|
Icaab2608
Member
Posts: 85
Threads: 37
Joined: Jul 2013
Reputation:
0
|
RE: Script
(07-19-2013, 10:19 AM)No Author Wrote: Does your other script works ? No,I already say.
|
|
07-19-2013, 11:42 AM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: Script
What's the problem here? Is one of the look at scripts doesn't work? If so, please tell me which one.
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|
07-19-2013, 11:46 AM |
|
Icaab2608
Member
Posts: 85
Threads: 37
Joined: Jul 2013
Reputation:
0
|
RE: Script
(07-19-2013, 11:46 AM)JustAnotherPlayer Wrote: What's the problem here? Is one of the look at scripts doesn't work? If so, please tell me which one. void Look2(string&in asTimer)
{
PlaySoundAtEntity("", "react_breath", "Player", 0, false);
StartPlayerLookAt("Look2", 2, 3, "");
MovePlayerHeadPos(0, 0, 0, 5, 0.0f);
AddTimer("Look3", 2.5f, "Look3");
}
|
|
07-19-2013, 01:43 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: Script
Remove the MovePlayerHeadPos part. Maybe it'll work now.
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|
07-19-2013, 01:50 PM |
|
|