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
Configuration Files Help How do i make the end of the storie when player enter area
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#5
RE: How do i make the end of the storie when player enter area

(01-02-2012, 04:23 AM)junkfood2121 Wrote: Well, make some script areas where you want the player to look, then use StartPlayerLookAt function to make him look at a specific area. You can use timers to make him look at several different areas, and to stop looking, use StopPlayerLookAt.



If you want the player to fall down somewhere, use a block box and then set it inactive with SetEntityActive script when you want him to fall down.



So i will make area for that look func
How is that script sorry im new :S Never done , force player to look Sad

void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
void StopPlayerLookAt(); is it that
And how do i make a few of them i want him to look at left after that right then he falling down...
this is my hps
PHP Code: (Select All)
void OnStart()
{
//START MOVE SHELF EVENT1
    
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
//END MOVE SHELF EVENT1

//START SERVANT BRUTE EVENT1
    
AddEntityCollideCallback("Player", "monsterspawn_1", "MonsterFunction", true, 1); 
    
AddEntityCollideCallback("servant_brute_1", "servant_grunt_1_remove", "RemoveMonster", true, 1);
//END SERVANT BRUTE EVENT1

//START CROWBAR EVENT1
    
AddUseItemCallback("", "crowbar_1", "mansion_1", "CrowbarOnDoor", true);
    
AddEntityCollideCallback("crowbar_joint_1", "door_script_1", "crowbarfunc", true, 1);
    
SetEntityActive("crowbar_joint_1", false);
//END CROWBAR EVENT1
//START KEY EVENT1
AddUseItemCallback("", "Hidden door key", "Hidden Door", "KeyOnDoor", true); 
}
//END KEY EVENT1

//START MOVE SHELF EVENT1
void func_shelf(string &in asEntity, int alState)
{
if (
alState == 1)
{
    
SetMoveObjectState("shelf",1.0f);
    
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
    return;
}
}
//END MOVE SHELF EVENT1


//START SERVANT BRUTE EVENT1 
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
    
SetEntityActive("servant_brute_1", true); 
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 2, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
    
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
}    

void RemoveMonster(string &in asParent, string &in asChild, int alState)
{
    
SetEntityActive("servant_brute_1", false);
} 
//END SERVANT BRUTE EVENT1

//START CROWBAR EVENT1
void CrowbarOnDoor(string &in item, string &in door)
{
    
SetEntityActive("crowbar_joint_1", true);
    
RemoveItem("crowbar_1");
}

void crowbar(string &in asItem, string &in asEntity)
{
    
SetEntityActive("crowbar_joint_1", true);
}

void crowbarfunc(string &in asParent, string &in asChild, int alState)
{
    
SetPropHealth("mansion_1", 0.0f);
    
SetEntityActive("crowbar_joint_1", false);
}
//END CROWBAR EVENT1

//START KEY EVENT1
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Hidden Door", false, true);
RemoveItem("Hidden door key");
PlaySoundAtEntity("", "unlock_door.snt", "Hidden Door", 0.0f, true);
}
//END KEY EVENT1

void OnEnter() 
{

}

void OnLeave() 
{

} 

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 01-02-2012, 04:34 AM by jessehmusic.)
01-02-2012, 04:28 AM
Website Find


Messages In This Thread
RE: How do i make the end of the storie when player enter area - by jessehmusic - 01-02-2012, 04:28 AM



Users browsing this thread: 1 Guest(s)