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 Look at Script function
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#1
Look at Script function

Hi, i am trying to make it when you look at an script area a message appears on the screen.



PHP Code: (Select All)
////////////////////////////
// Run first time starting map
void OnStart()
{
    
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
    
if(ScriptDebugOn())
    {
        
GiveItemFromFile("lantern""lantern.ent");
 
        for(
int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
    }
    
AddEntityCollideCallback("Player","ScriptArea_1","RollCredits",false,1);
    
AddUseItemCallback("","wooden_bucket_filled_1","ScriptArea_1","PutOutFire"true);
}

void PutOutFire(string &in asItemstring &in asEntity) {
    
SetEntityActive("SignArea_1",false);
    
SetEntityActive("Key_Cabinet",true);
    
DestroyParticleSystem("ParticleSystem_1");
    
SetEntityActive("ScriptArea_1",false);
}

void Fire(string &in asEntityint alState) {
    if(
alState == 1) {
    
SetMessage("Observation""Fire"2.0f);
}
}

void InfectedAppear(string &in asEntity) {
    
SetSwingDoorLocked("cabinet_metal_1"truefalse);
    
SetSwingDoorClosed("cabinet_metal_1"truetrue);
    
AddTimer("0",1.5f,"InfectiveActive");
}

void InfectiveActive(string &in asTimer) {
    
SetEntityActive("character_infected_alpha_1",true);
}
    
////////////////////////////
// Run when entering map
void OnEnter()
{
 
}
 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


This is what i have. It doesnt show up and i know my lang file is correct. Any one know why?

Rep if like me or im helpful or you love my stories!
Stephanos house
11-09-2011, 09:56 AM
Find


Messages In This Thread
Look at Script function - by Gamemakingdude - 11-09-2011, 09:56 AM
RE: Look at Script function - by Your Computer - 11-09-2011, 01:28 PM
RE: Look at Script function - by Gamemakingdude - 11-09-2011, 01:30 PM
RE: Look at Script function - by Your Computer - 11-09-2011, 01:43 PM
RE: Look at Script function - by palistov - 11-09-2011, 07:29 PM



Users browsing this thread: 1 Guest(s)