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
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#2
RE: Intro script help

As far as I know SenEntityActive should come after patrol nodes and not before
12-21-2013, 05:38 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#3
RE: Intro script help

(12-21-2013, 05:38 PM)The Mug Wrote: As far as I know SenEntityActive should come after patrol nodes and not before

Alrighty Big Grin thanks
12-21-2013, 06:42 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#4
RE: Intro script help

undefined

undefined
(This post was last modified: 12-23-2013, 10:10 PM by lothabread.)
12-23-2013, 09:34 PM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#5
RE: Intro script help

my desktop wouldnt post the other past posts so im on ,y laptop again. and i still cant get the player to look where i would like them to
12-26-2013, 07:35 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#6
RE: Intro script help

Does the player not look at a particular one of your required areas or all?

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 12-26-2013, 08:17 AM by Romulator.)
12-26-2013, 08:17 AM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#7
RE: Intro script help

(12-26-2013, 08:17 AM)Romulator Wrote: Does the player not look at a particular one of your required areas or all?

The player looks at the first one. But then fails to continue to the others.
12-26-2013, 09:09 AM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#8
RE: Intro script help

hmm okay, out of nowhere, the manpigs no longer walk, and i have resaved them but to no avail, very odd things happening out of nowhere
(This post was last modified: 12-27-2013, 07:05 AM by lothabread.)
12-27-2013, 05:40 AM
Find
lothabread Offline
Member

Posts: 106
Threads: 11
Joined: Apr 2012
Reputation: 2
#9
RE: Intro script help

alrighty, scratch the before post, i fixed it Big Grin, but on the other hand, stil havent progressed with the player problem, ive tried the case script but im not all too sure as to how it works
12-27-2013, 07:05 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#10
RE: Intro script help

I never understood cases :p I always used timers. If you find cases difficult, perhaps try them instead :3 Not a perfect way to do things, but it can serve as a workaround in the meantime if that helps.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
12-27-2013, 09:24 AM
Find




Users browsing this thread: 1 Guest(s)