The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Intro script help and monster nodes [SOLVED]
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#1
Intro script help and monster nodes [SOLVED]

hey everybody, i seem to be having a biiiiit of trouble getting an intro up and running for a Demo i'll be showing off for my school sometime in may.

What i want is for the player to look at area 2, 4, 3, 1, and then back at 2. but when ever i do start up the game it fails to go to the second one. Oh and how is it i could go about making an enemy walk around on its own during a cutscene? ive placed nodes and stuff, but he doesnt move away until he sees me? APPOLOGIES FOR THE WALL OF TEXT

PHP Code: (Select All)
////////////////////////////
// Run when starting game
void OnStart()
{
    if(
ScriptDebugOn())
          {
               
GiveItemFromFile("lantern""lantern.ent");
               
SetPlayerLampOil(100.0f);
 
               for(
int i 0;10;i++)
               {
                    
GiveItemFromFile("tinderbox""tinderbox.ent");
               }
          }
    
SetSanityDrainDisabled(true);
    
SetPlayerCrouching(true);
    
SetPlayerActive(false);
    
FadeOut(0);
    
AddTimer("Intro"2.0f"Intro");
}

void Intro(string &in asTimer)
{
    
string sEvent asTimer;    
    
AddLocalVarInt(sEvent1);    
    
bool bPauseAtStep false;    

    
float fEventSpeed 1.0f;    
    
    switch(
GetLocalVarInt(sEvent))
    {
        case 
1:
            
PlayGuiSound(""1.0f);
            
FadeIn(4.0f);
            
StartPlayerLookAt("AreaIntroLook_2"1.0f1.0f"");
            
FadePlayerRollTo(-450.88);
            
fEventSpeed 2.0f;
        break;
        
        case 
2:
            
StartPlayerLookAt("AreaIntroLook_4"1.0f1.0f"");
            
fEventSpeed 2.0f;
        break;
        
        case 
3:
            
StartPlayerLookAt("AreaIntroLook_3"1.0f1.0f"");
            
PlayGuiSound(""0.7f);
            
FadeOut(3.0f);
        break;
        
        case 
4:
            
FadeIn(6.0f);
            
SetPlayerLookSpeedMul(0.06f);
            
StartPlayerLookAt("AreaIntroLook_1"1.0f1.0f"");
        break;
        
        case 
5:
            
StartPlayerLookAt("AreaIntroLook_2"1.0f1.0f"");
            
FadeOut(8.0f);
            
PlayGuiSound(""0.8f);
            
fEventSpeed 4.0f;
        break;
    }
}

void monster(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("engineer_1"true);
    
AddEnemyPatrolNode("engineer_1""PathNodeArea_1"0"");
    
AddEnemyPatrolNode("engineer_1""PathNodeArea_2"0.001"");
    
AddEnemyPatrolNode("engineer_1""PathNodeArea_3"0"");
}

void OnBruteCollide_1(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("engineer_1"false);
}



////////////////////////////
// Run when entering map
void OnEnter()
{

(This post was last modified: 12-29-2013, 06:08 AM by lothabread.)
12-21-2013, 05:18 PM
Find


Messages In This Thread
Intro script help and monster nodes [SOLVED] - by lothabread - 12-21-2013, 05:18 PM
RE: Intro script help - by WALP - 12-21-2013, 05:38 PM
RE: Intro script help - by lothabread - 12-21-2013, 06:42 PM
RE: Intro script help - by lothabread - 12-23-2013, 09:34 PM
RE: Intro script help - by lothabread - 12-26-2013, 07:35 AM
RE: Intro script help - by Romulator - 12-26-2013, 08:17 AM
RE: Intro script help - by lothabread - 12-26-2013, 09:09 AM
RE: Intro script help - by lothabread - 12-27-2013, 05:40 AM
RE: Intro script help - by lothabread - 12-27-2013, 07:05 AM
RE: Intro script help - by Romulator - 12-27-2013, 09:24 AM
RE: Intro script help - by daortir - 12-27-2013, 10:30 PM
RE: Intro script help - by lothabread - 12-28-2013, 02:04 AM
RE: Intro script help - by Romulator - 12-28-2013, 02:30 AM
RE: Intro script help - by lothabread - 12-28-2013, 03:40 AM
RE: Intro script help - by Slanderous - 12-28-2013, 12:28 PM
RE: Intro script help - by lothabread - 12-28-2013, 05:05 PM
RE: Intro script help - by Damascus - 12-29-2013, 01:01 AM
RE: Intro script help - by lothabread - 12-29-2013, 03:12 AM
RE: Intro script help - by daortir - 12-29-2013, 03:28 AM



Users browsing this thread: 1 Guest(s)