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
Need help for Insanity script
lightsheik Offline
Junior Member

Posts: 17
Threads: 5
Joined: Feb 2011
Reputation: 0
#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
lightsheik Offline
Junior Member

Posts: 17
Threads: 5
Joined: Feb 2011
Reputation: 0
#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
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#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
Website Find
lightsheik Offline
Junior Member

Posts: 17
Threads: 5
Joined: Feb 2011
Reputation: 0
#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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#5
RE: Need help for Insanity script

remove the ; last in: void insanity1(string &in entity);
02-19-2011, 01:48 AM
Find
lightsheik Offline
Junior Member

Posts: 17
Threads: 5
Joined: Feb 2011
Reputation: 0
#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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#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
lightsheik Offline
Junior Member

Posts: 17
Threads: 5
Joined: Feb 2011
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)