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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrong script!Why!?
Author Message
ModManDann Offline
Member

Posts: 61
Joined: Dec 2010
Reputation: 0
Post: #21
RE: Wrong script!Why!?

void onEnter()
    {
         AddUseItemCallback("","BedroomKey_1","mansion_1","DoorUnlock",true);
    }
void DoorUnlock(string &in asItem, string &in asEntity)
    {
        RemoveItem(asItem);
        SetSwingDoorLocked(asEntity,false,true);
        PlaySoundAtEntity("","unlock_door",asEntity,0.0f,false);
    }

Current project: Mind Trap
(This post was last modified: 01-06-2011 09:15 PM by ModManDann.)
01-06-2011 09:12 PM
Find all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #22
RE: Wrong script!Why!?

Fatal error could not lod script file D\.....hps.
main(13,72):ERR:unexpected end of file
please help me
01-06-2011 10:29 PM
Find all posts by this user Quote this message in a reply
Janni1234 Offline
Member

Posts: 134
Joined: Jan 2011
Reputation: 1
Post: #23
RE: Wrong script!Why!?

@toni1998 pls send your scripting file.
@ModManDann Thx
void OnStart()
{

AddEntityCollideCallback("Player", "area_scare_1", "areascare1", true, 1);
AddEntityCollideCallback("Player", "gruntsound_1", "gruntsound1", true, 1);
AddEntityCollideCallback("Player", "area_brute_1", "areabrute1", true, 1);
AddEntityCollideCallback("Player", "area_brute_2", "areabrute2", true, 1);
AddEntityCollideCallback("Player", "areaslime_1", "areaslime1", true, 1);
AddEntityCollideCallback("Player", "gruntsound_2", "gruntsound2", true, 1);
AddEntityCollideCallback("Player", "gruntsound_3", "gruntsound3", true, 1);
AddEntityCollideCallback("Player", "area_key_1", "areakey1", true, 1);
AddEntityCollideCallback("Player", "area_brute_3", "areabrute3", true, 1);
AddEntityCollideCallback("Player", "key_machineroom", "door_machineroom", "DoorUnlock", true);
} PlayMusic("12_amb.ogg", true, 0.7f, 1, 0, false);

void OnEnter()
{
PlayMusic("12_amb.ogg", true, 0.7f, 1, 0, false);
}

void areascare1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "04_hole_squeal.snt", "candle_floor_1", 0, false);
PlaySoundAtEntity("Player", "break_stairs.snt", "candle_floor_1", 0, false);
}

void gruntsound1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "notice.snt", "candle_floor_3", 0, false);
}

void areabrute1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 1.0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 1.0, "");
PlaySoundAtEntity("Player", "react_pant.snt", "brick_pile01_2", 0, false);
}

void areaslime1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("slime_6way_1", true);
SetEntityActive("slime_pile_1", true);
SetEntityActive("slime_egg_1", true);
PlaySoundAtEntity("Player", "guardian_activated.snt", "slime_pile_1", 0, false);
AddTimer("shakeshackles", 2.5f, "TimerShakeShackles");
}

void areabrute2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_2", true);
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_10", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_11", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "pathNodeArea_12", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_13", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_14", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_15", 1.0, "");
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_16", 1.0, "");
PlaySoundAtEntity("Player", "react_scare.snt", "candlestick_floor_4", 0, false);
}

void gruntsound2(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "amb_idle_whimp.snt", "candle_floor_9", 0, false);
PlaySoundAtEntity("Player", "react_scare.snt", "candle_floor_9", 0, false);
}



void gruntsound3 (string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "amb_idle_whimp.snt", "candle_floor_15", 0, false);
PlaySoundAtEntity("Player", "scare_slam_door.snt", "candle_floor_15", 0, false);
}


void areabrute3(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_brute_3", true);
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_17", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_18", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_19", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_20", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_21", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_22", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_23", 1.0, "");
AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_24", 1.0, "");
PlaySoundAtEntity("Player", "react_scare.snt", "candle_floor_14", 0, false);
PlaySoundAtEntity("Player", "enemy_hallucination_disappear.snt", "candle_floor_14", 0, false);
}

void DoorUnlock(string &in asItem , string &in asEntity)
{
RemoveItem(asItem);
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("Player", "unlock_door", asEntity, 0.0f, false);
}

ERROR!Can you help me!? what is wrong with the key script!? Huh
(This post was last modified: 01-06-2011 11:11 PM by Janni1234.)
01-06-2011 10:45 PM
Find all posts by this user Quote this message in a reply
ModManDann Offline
Member

Posts: 61
Joined: Dec 2010
Reputation: 0
Post: #24
RE: Wrong script!Why!?

What's the error you're getting

Current project: Mind Trap
01-06-2011 11:39 PM
Find all posts by this user Quote this message in a reply
xiphirx Offline
Senior Member

Posts: 662
Joined: Nov 2010
Reputation: 5
Post: #25
RE: Wrong script!Why!?

I love this guy.

01-06-2011 11:41 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Senior Member

Posts: 307
Joined: Nov 2010
Reputation: 0
Post: #26
RE: Wrong script!Why!?

He just.. doesn't.. learn, does he? Big Grin
01-06-2011 11:43 PM
Find all posts by this user Quote this message in a reply
Janni1234 Offline
Member

Posts: 134
Joined: Jan 2011
Reputation: 1
Post: #27
RE: Wrong script!Why!?

FATAL ERROR:Could not load script file
'custom stories/....
main(14,25):ERR:Expected Edentifier
01-07-2011 12:03 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Senior Member

Posts: 307
Joined: Nov 2010
Reputation: 0
Post: #28
RE: Wrong script!Why!?

That means you have an error on line 14. And as you can see:

PlayMusic("12_amb.ogg", true, 0.7f, 1, 0, false);

This is outside of your function, it shouldn't be.
01-07-2011 12:07 AM
Find all posts by this user Quote this message in a reply
Janni1234 Offline
Member

Posts: 134
Joined: Jan 2011
Reputation: 1
Post: #29
RE: Wrong script!Why!?

Ohh!Thanks Big Grin
01-07-2011 01:09 AM
Find all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #30
RE: Wrong script!Why!?

AddEntityCollideCallback("Player", "DeadArea", "DeadArea", true, 1);
AddEntityCollideCallback("Player", "GruntArea", "GruntArea", true, 1);
AddEntityCollideCallback("Player", "BruteArea", "areabrute", true, 1);
AddEntityCollideCallback("Player", "LostArea", "LostArea", true, 1);
AddEntityCollideCallback("Player", "Keyliving", "LivingDoor", true, 1);
AddEntityCollideCallback("Player", "Keycristal", "CristalDoor", true, 1);
AddEntityCollideCallback("Player", "Keyescape", "EscapeDoor", true, 1);
01-07-2011 03:07 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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