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 Parentheses issue
Grimm101 Offline
Junior Member

Posts: 12
Threads: 3
Joined: Dec 2011
Reputation: 0
#12
RE: Parentheses issue

I don't understand how that worked, but it did! I'm going to look into this more, thanks a lot mate your a scholar!


EDIT: Ok so sorry for being a pain again. I've got this door to make sounds that I want but i also wanted my character to face the door and be frightened. I have managed to do that but i dont know how to make the character's aspectMulto and FOVMulto go back to normal. If you could tell me that would be great thanks. Code below again

PHP Code: (Select All)
////////////////////////////////
// Run when starting the map
void OnStart()
////////////////////////////////
// Entities
{
    
AddUseItemCallback("""Bedroom_Key""Bedroom_Key_Door""UsedKeyOnDoor"true); //Assigns the key to the door and sets the action of this as UsedKeyOnDoor
    
AddEntityCollideCallback("Player""DoorCloseArea1""DoorCloseBang"true1); //Declaring when a player walks into an area called "Name" Deletes the possibility of it happening again so it can only happen once: Number = 1 for player enters. -1 for when player leaves. 0 for both
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity//Declaring the Key as a string 
{
        
SetSwingDoorLocked("Bedroom_Key_Door"falsetrue); //Sets what door the key works on and it can only be used once
            
PlaySoundAtEntity("""unlock_door.snt""Bedroom_Key_Door"0false); //Plays sound when the key is used on the door
            
RemoveItem("Bedroom_Key"); //Removes the key after it has been used
}

void DoorCloseBang(string &in asParentstring &in asChildint alState
{
    
SetSwingDoorClosed("Bedroom_Key_Door"truetrue); //Closes a swing door: Effects indicate true to see the door close
        
PlaySoundAtEntity("""24_bang.snt""Bedroom_Key_Door"0false); //Create banging on the door sound when the door shuts
        
PlaySoundAtEntity("""react_breath.snt""Bedroom_Key_Door"0false); //Create banging on the door sound when the door shuts
        
PlaySoundAtEntity("""15_the_big_scream.snt""Bedroom_Key_Door"0false); //Create banging on the door sound when the door shuts
            
FadePlayerFOVMulTo(0.6f5.0f); //Zooms the screen adding to the wobble effect
            
FadePlayerAspectMulTo(0.6f1.0f); //Stretches the screen giving wobble effect
            
FadeImageTrailTo(0.5f1.0f); //Adds blur making the wobble effect better
            
StartPlayerLookAt("Bedroom_Key_Door"10.0f10.0f""); //Makes the player look at the bedroom door
                
AddTimer(""2.0f"StopLooking"); //timer to stop looking at the door after 2 seconds
}

void StopLooking(string &in asTimer)
{
StopPlayerLookAt(); //Stop looking at the door
}

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

////////////////////////////////
// Run when leaving the map
void OnLeave()
{


(This post was last modified: 12-23-2011, 03:03 AM by Grimm101.)
12-23-2011, 01:30 AM
Find


Messages In This Thread
Parentheses issue - by Grimm101 - 12-22-2011, 10:56 PM
RE: Parentheses issue - by Your Computer - 12-22-2011, 11:45 PM
RE: Parentheses issue - by Grimm101 - 12-22-2011, 11:55 PM
RE: Parentheses issue - by Your Computer - 12-23-2011, 12:14 AM
RE: Parentheses issue - by Apjjm - 12-23-2011, 12:15 AM
RE: Parentheses issue - by Grimm101 - 12-23-2011, 12:21 AM
RE: Parentheses issue - by Your Computer - 12-23-2011, 12:57 AM
RE: Parentheses issue - by Grimm101 - 12-23-2011, 01:00 AM
RE: Parentheses issue - by Your Computer - 12-23-2011, 01:06 AM
RE: Parentheses issue - by Grimm101 - 12-23-2011, 01:08 AM
RE: Parentheses issue - by DRedshot - 12-23-2011, 01:18 AM
RE: Parentheses issue - by Grimm101 - 12-23-2011, 01:30 AM
RE: Parentheses issue - by Your Computer - 12-23-2011, 03:30 AM



Users browsing this thread: 1 Guest(s)