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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help My script doesn't work in my map.
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: My script doesn't work in my map.

void OnStart()
{
    AddUseItemCallback("", "key_1", "castle_arched01_1", "UsedKeyOnDoor", true);
    SetEntityPlayerInteractCallback("monster_key", "ActivateMonster", true);
    AddEntityCollideCallback("Player", "push", "Push", true, 1);
    AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1);
    AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
    PlaySoundAtEntity("", "introvoice.snt", "introvoice", 1, false);

}

void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}

void Push(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "push", 0, false);
AddPlayerBodyForce(30000, 0, 0, false);
}


void Slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("castle_1", true, true);
SetSwingDoorLocked("castle_1", true, true);
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked(asEntity, false, true);
    PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
    RemoveItem(asItem);
}

void OnEnter()
{
    PlayMusic("introvoice.[b]snt[/b]", true, 0.9, 1.0, 1, true);
}

void OnLeave()
{
    StopMusic(1 , 1);
}

Ok, fixed some things. Now, delete .map_cache if you have and check the names. Stuff like that is what causes errors.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-27-2012, 07:31 PM
Find


Messages In This Thread
My script doesn't work in my map. - by Aquatric - 12-27-2012, 07:15 PM
RE: My script doesn't work in my map. - by The chaser - 12-27-2012, 07:31 PM
RE: My script doesn't work in my map. - by i3670 - 12-28-2012, 05:31 PM



Users browsing this thread: 1 Guest(s)