Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Causing sanity damage to yourself
Author Message
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #11
RE: Causing sanity damage to yourself

Post you script so we can see what you are trying to do.
09-20-2010 07:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RaptorRed Offline
Junior Member

Posts: 6
Joined: Sep 2010
Reputation: 0
Post: #12
RE: Causing sanity damage to yourself

(09-20-2010 07:41 AM)jens Wrote:  Post you script so we can see what you are trying to do.
////////////////////////////
// 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");
    }

}

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

}

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

}

////////////////////////////
//Function as you specified in ConnectionStateChangeCallback
void PullLever(string &in asEntity, alState)
{
    //If the lever is pulled max up or down then give sanity damage
    if(alState == 1 or alState == -1)
    {
        GiveSanityDamage(40, true);  
    }
}
09-21-2010 01:54 AM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #13
RE: Causing sanity damage to yourself

Argh, sorry.
void PullLever(string &in asEntity, alState) should be
void PullLever(string &in asEntity, int alState)
09-21-2010 06:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RaptorRed Offline
Junior Member

Posts: 6
Joined: Sep 2010
Reputation: 0
Post: #14
RE: Causing sanity damage to yourself

(09-21-2010 06:19 AM)jens Wrote:  Argh, sorry.
void PullLever(string &in asEntity, alState) should be
void PullLever(string &in asEntity, int alState)

thanks, it finally works.
09-21-2010 01:47 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)