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

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help for Insanity script
Author Message
lightsheik Offline
Junior Member

Posts: 17
Joined: Feb 2011
Reputation: 0
Post: #1
Need help for Insanity script
I'm not really good a scripting and my script dosent work. I looked on the forum and tried a lot of things but it dosent work. I dont know what to write and where to write it and just tried what I thought would make sense. (Sorry, i'm not really good in english, my first language is french)

This is the script:

void SetEntityPlayerLookAtCallback(string& Corpse1, string& Corpse11, 1 abRemoveWhenLookedAt);
{
StartScreenShake(0.5 afAmount, 0.5 afTime, 0.5 afFadeInTime,0.8 afFadeOutTime);
}
02-18-2011 11:23 PM
Find all posts by this user Quote this message in a reply
lightsheik Offline
Junior Member

Posts: 17
Joined: Feb 2011
Reputation: 0
Post: #2
RE: Need help for Insanity script
I tried this, but it dosent work:

void OnStart()
{
SetEntityPlayerInteractCallback("cabinet_simple_2", "insanity1", true);
}

void insanity1(string &in entity);
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
}
02-19-2011 01:19 AM
Find all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,091
Joined: Mar 2009
Reputation: 66
Post: #3
RE: Need help for Insanity script
What doesn't work?
Give it a 90.0f instead of 10.0f and see if it works.

Also, your screenshake values are too small.

(This post was last modified: 02-19-2011 01:36 AM by Tanshaydar.)
02-19-2011 01:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
lightsheik Offline
Junior Member

Posts: 17
Joined: Feb 2011
Reputation: 0
Post: #4
RE: Need help for Insanity script
Sorry, It just dosent work. When I open my story the whole game crash.
(This post was last modified: 02-19-2011 01:43 AM by lightsheik.)
02-19-2011 01:37 AM
Find all posts by this user Quote this message in a reply
Vradcly Offline
Member

Posts: 100
Joined: Jan 2011
Reputation: 0
Post: #5
RE: Need help for Insanity script
remove the ; last in: void insanity1(string &in entity);
02-19-2011 01:48 AM
Find all posts by this user Quote this message in a reply
lightsheik Offline
Junior Member

Posts: 17
Joined: Feb 2011
Reputation: 0
Post: #6
RE: Need help for Insanity script
Thank you so much, its working now. I've been trying to do it for 2 hours straight.
Sorry but I have another question. If I wanted to delay the event by 1 sec, how would I do that. I tried this but it dosent work:

void OnStart()
{
AddTimer("time1", 1, "insanity1")
SetEntityPlayerInteractCallback("cabinet_simple_2", "insanity1", true);
}

void insanity1(string &in entity)
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
}
(This post was last modified: 02-19-2011 02:12 AM by lightsheik.)
02-19-2011 02:00 AM
Find all posts by this user Quote this message in a reply
Vradcly Offline
Member

Posts: 100
Joined: Jan 2011
Reputation: 0
Post: #7
RE: Need help for Insanity script
void OnStart()
{
SetEntityPlayerInteractCallback("cabinet_simple_2", "insanity1", true);
}

void insanity1(string &in entity)
{
AddTimer("time1", 1, "Timerinsanity1")
}

void Timerinsanity1(string &in asTimer)
{
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
GiveSanityDamage(10.0f, true);
}

Like that Smile Hope you understand what I did...
02-19-2011 03:27 AM
Find all posts by this user Quote this message in a reply
lightsheik Offline
Junior Member

Posts: 17
Joined: Feb 2011
Reputation: 0
Post: #8
RE: Need help for Insanity script
It works ! Thank you. I know a lot of people are asking question like this and I appreciate that you took the time to help me.
02-19-2011 03:51 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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