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
DONE - script not working pls help
boghinovel Offline
Junior Member

Posts: 10
Threads: 3
Joined: Sep 2013
Reputation: 0
#3
RE: script not working pls help

(09-15-2013, 01:54 PM)Neelke Wrote: I'm pretty sure you can't put SetPlayerLampOil there. Move it under the GiveItemFromFile script. Like this:

GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);

Also you don't really need the setplayerlampoil. It is already full when you start the game.

If that is not the problem, try to put the GiveItemFromFile with tinderboxes like this instead:

for(int i = 0;i < 30;i++) GiveItemFromFile("tinderbox", "tinderbox.ent");

Everything else seems to be just fine. If these are not the issues, I have no idea.

ok so i have done wath you sayd but the monster is not spawning when i go to area script
when in game to spawn_enemy_1 area script, nothing hapens
it supose to spawn enemy_1 wich is a grunt deactivated and supose to folow the path_node_1,2,3 . . .
so wath is bad here coz i don't get it Huh

void OnStart()
    {
        GiveItemFromFile("lantern", "lantern.ent");
        SetPlayerLampOil(100.0f);

        for(int i = 0;i < 30;i++) GiveItemFromFile("tinderbox", "tinderbox.ent");

        AddUseItemCallback("", "key1", "door1", "KeyOnDoor", true);
        AddUseItemCallback("", "key2", "door2", "KeyOnDoor", true);

        AddEntityCollideCallback("Player", "spawn_enemy_1", "enemy_1", true, 1);
        AddEntityCollideCallback("enemy_1","stop","CollideStop",true,1);

        FadeOut(0.0f);

        AddTimer("internal.timer.id", 5.0f, "MyFunc");
    }



void KeyOnDoor(string &in asItem, string &in asEntity)
    {
        SetSwingDoorLocked("door1", false, true);
        SetSwingDoorLocked("door2", false, true);

        PlaySoundAtEntity("", "unlock_door.snt", "door1", 0.0f, true);
        PlaySoundAtEntity("", "unlock_door.snt", "door2", 0.0f, true);
    }



void monster(string &in asParent, string &in asChild, int alState)
    {
        SetEntityActive("enemy_1",true);
        AddEnemyPatrolNode("enemy_1","path_node_1",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_2",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_3",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_4",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_5",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_6",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_7",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_8",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_9",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_10",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_11",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_12",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_13",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_14",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_15",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_16",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_17",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_18",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_19",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_20",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_21",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_22",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_23",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_24",0,"");
        AddEnemyPatrolNode("enemy_1","path_node_25",0,"");
    }



void CollideStop(string &in asParent, string &in asChild, int alState)
    {
        SetEntityActive("enemy_1",false);
    }



void MyFunc(string &in timerID)
    {
        FadeIn(5.0f);
    }









void OnEnter()
{
}

void OnLeave()
{
}
09-15-2013, 02:13 PM
Find


Messages In This Thread
RE: script not working pls help - by Neelke - 09-15-2013, 01:54 PM
RE: script not working pls help - by boghinovel - 09-15-2013, 02:13 PM
RE: script not working pls help - by boghinovel - 09-15-2013, 02:33 PM
RE: script not working pls help - by boghinovel - 09-15-2013, 03:22 PM



Users browsing this thread: 2 Guest(s)