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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JENS OR ANYBODY who has all knowlege of SANITYEVENTS\HUDS.HELP!!!
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#1
JENS OR ANYBODY who has all knowlege of SANITYEVENTS\HUDS.HELP!!!

[/u]hERE IS THE PROBLEM:


void OnStart()
{
AddEntityCollideCallback("Player", "ActivateGlass", "GoCheckthehud", true, 1);
}

void GoCheckthehud(string &in asParent, string &in asChild, int alState)
{
CheckHUD();
}

void CheckHUD()
{
if(InsanityEventIsActive() == false)
{
SetInsanitySetEnabled("PhoneHud_New", true);
StartRandomInsanityEvent();
CheckHUD();
}
return;
}

---------------
I want a Specific HUD "sanityEvent" to pop up AFTER i enter a script area.
It gives me this error message..
COMPILING VOIDCHECKHUD...
NO CONVERSION FROM VOID TO BOOL AVAILABLE...
-----
Maybe someone could help me out.

QUESTION 2[u]
How can i be 100% sure that my CUSTOM HUD works everytime i enter an area...
The issue is this :
The HUD only appears RANDOMLY like 4\10 times is does show up..
as you could understand.. it must ALWAYS SHOW UP!!
---
Is there any script that could CHECK IF SetInsanitySetEnabled("PhoneHud_New", true); ==good,,,,, if that sanityevent is NOT activated then make some script that it MUST activate it!?!?!
--
Thank you for reading and helping me.
DnALANGE
(This post was last modified: 07-09-2013, 06:30 PM by DnALANGE.)
07-08-2013, 02:51 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Could use some help with this script not working.

It would appear the wiki is inaccurate in its signature concerning InsanityEventIsActive. Not sure how frequent you want the insanity events to occur, but deactivating the area after collision and reactivating it after 30 seconds should be fine. I'll look into InsanityEventIsActive and see if it is used anywhere in the original campaign.

Tutorials: From Noob to Pro
07-08-2013, 03:44 PM
Website Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#3
RE: Could use some help with this script not working.

(07-08-2013, 03:44 PM)Your Computer Wrote: It would appear the wiki is inaccurate in its signature concerning InsanityEventIsActive. Not sure how frequent you want the insanity events to occur, but deactivating the area after collision and reactivating it after 30 seconds should be fine. I'll look into InsanityEventIsActive and see if it is used anywhere in the original campaign.

Thank you Your Computer,
The problem is now..
i am working on the mod now...
i have created 1 big area, when you enter it the HUD "has to" SHow up, <-- Does it like randomly... hmmmmm!!!
And when i enter 2 other scriptarea's the sanityeffect="HUD" will be removed <--- THIS works perfect!
BUT the most importend one..
WHY isn't the sanity event working like... sometimes \ randmly..
the ONLY thing i can understand is.. the games-engine, is looking for 7 different types on 1 ssanityevent <-- = AMNESIA INSANITY...
That is what i can try?? put 7 different huds and try to ... id ont know from here HEHEHEE....
Should be WAY easyer isn't it?
-----
If anybody could awnser this, THEN more people could make custom huds easyer..
I have done it now and before, but just randonly activation??...
-
BTW, I AM WORKING ON A FC HERE.
Thanks for the ones who bimp this and might help me.
Lange
07-08-2013, 04:16 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Could use some help with this script not working.

Look at game.cfg and look for the Insanity element. This regulates the occurrences of insanity effects. If you reduce the wait times to 0 or close to 0, they should occur more frequently.

Tutorials: From Noob to Pro
(This post was last modified: 07-08-2013, 04:24 PM by Your Computer.)
07-08-2013, 04:23 PM
Website Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#5
RE: Could use some help with this script not working.

(07-08-2013, 04:23 PM)Your Computer Wrote: Look at game.cfg and look for the Insanity element. This regulates the occurrences of insanity effects. If you reduce the wait times to 0 or close to 0, they should occur more frequently.

I will try This Computer,
Thanks for the help, and IF it works i'll let you\everyone here know.
Back later = testing.

(07-08-2013, 05:07 PM)DnALANGE Wrote:
(07-08-2013, 04:23 PM)Your Computer Wrote: Look at game.cfg and look for the Insanity element. This regulates the occurrences of insanity effects. If you reduce the wait times to 0 or close to 0, they should occur more frequently.

I will try This Computer,
Thanks for the help, and IF it works i'll let you\everyone here know.
Back later = testing.

---
Nope,
NOT working here...
WHY is that?
when i am ingame -> f1 "debugmode" -> and startsanityevent ,"my new HUD" it works ALWAYS...
but when i try in game entering a scriptarea, it just doenst work all the time, only randomly...
I really need to fix thisor the game would look really weird without that hud on some places....
---
Btw,
It must be ONLY 1 time that the HUD must be activated,
and then when i leave the area OFFCOURSE it must be activated again.
The scripts works fine, only still the HUD isne't showing every time SadSadSad
(This post was last modified: 07-08-2013, 06:00 PM by DnALANGE.)
07-08-2013, 05:07 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: Could use some help with this script not working.

Someone???
07-09-2013, 02:32 AM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#7
RE: Could use some help with this script not working.

(07-08-2013, 05:07 PM)DnALANGE Wrote: when i am ingame -> f1 "debugmode" -> and startsanityevent ,"my new HUD" it works ALWAYS...
but when i try in game entering a scriptarea, it just doenst work all the time, only randomly...

Had pretty much exactly the same experience testing out some custom sanity events being used in a particular way. I also tried editing settings for frequency as it made sense that a timer would be restricting it, due to the times where it would play or not. We were using 2 different events, normally one would play and not the other, however when booting Amnesia up for the first time it would almost always play both.

Even with the delay being set to 0 or 1, it didn't solve the issue, I spent several evenings investigating the issue but couldn't get anywhere with it. My guess would be there's some restriction in the source code that is responsible that we're not aware of.

Personally, my advice would be - don't use sanity events like that, they're clearly under-documented, so there's a fairly big risk of it breaking for some players even if you think you have solved the issue - i.e. if you don't know the cause, it can work all the time but you're never going to know if it's actually solved. If there is any other way to achieve what you want, do that instead.

On the other hand, if you do keep searching, please let us know if you find the solution!

07-09-2013, 11:09 AM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#8
RE: Could use some help with this script not working.

(07-09-2013, 11:09 AM)Adrianis Wrote:
(07-08-2013, 05:07 PM)DnALANGE Wrote: when i am ingame -> f1 "debugmode" -> and startsanityevent ,"my new HUD" it works ALWAYS...
but when i try in game entering a scriptarea, it just doenst work all the time, only randomly...

Had pretty much exactly the same experience testing out some custom sanity events being used in a particular way. I also tried editing settings for frequency as it made sense that a timer would be restricting it, due to the times where it would play or not. We were using 2 different events, normally one would play and not the other, however when booting Amnesia up for the first time it would almost always play both.

Even with the delay being set to 0 or 1, it didn't solve the issue, I spent several evenings investigating the issue but couldn't get anywhere with it. My guess would be there's some restriction in the source code that is responsible that we're not aware of.

Personally, my advice would be - don't use sanity events like that, they're clearly under-documented, so there's a fairly big risk of it breaking for some players even if you think you have solved the issue - i.e. if you don't know the cause, it can work all the time but you're never going to know if it's actually solved. If there is any other way to achieve what you want, do that instead.

On the other hand, if you do keep searching, please let us know if you find the solution!

Thank you for your reply,
I have been searching and experimenting for hour hours\days days...
Still can't find the solution..
However i have one more try..........
IF i have found out i will let you know here on the forum.
-
IF NOT, maybe someone who knows tis problem,
be free to let me \ us know!
This part is CRUCIAL in this full conversin!!!
Thanks again for bumping and helping,
07-09-2013, 02:25 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#9
RE: Could use some help with this script not working.

WALL OF TEXT BE WARNED
DAMN!!!!!!!!!!
can NOT find the solution!
i have tried EVERYTHING!
caould someone like JENS look at this?
Many people of us modders have problems with this!
I tried this :
1- Copy and paste 25 different ones like test_1 test_2 etc etc.. didnt work
2- change all the names in mainsanityeventst.cfg like :
Name = "test_1"
Set = "test1"
Name = "testone"
Set = "test_1"
Name = "test_1"
Set = "test_1"
ETC ETC ETC ETC ETC...
3- go into GAME.CFG and change all stuff like this to 0 \ 1:
EventsFile = "Mental Memorial/mm_misc/main_sanity_events.cfg"

MinTimeBetweenEvents = "300"
MaxEventSanity = "65"

MaxSanity_LongWait = "65"
MaxSanity_MedWait = "45"
MaxSanity_ShortWait = "25"
TimeBetween_LongWait = "270" <<<-ALL ORIGINAL
TimeBetween_MedWait = "180"
TimeBetween_ShortWait = "80"

MaxExamineSanity = "50"

InsanityArea_CheckTimeMin = "1"
InsanityArea_CheckTimeMax = "15"
---------------------------------------------
TO:
EventsFile = "Investigator/Investigator_misc/main_sanity_events.cfg"

MinTimeBetweenEvents = "1"
MaxEventSanity = "1"

MaxSanity_LongWait = "1
MaxSanity_MedWait = "1"
MaxSanity_ShortWait = "1"
TimeBetween_LongWait = "1"
TimeBetween_MedWait = "1"
TimeBetween_ShortWait = "1" <<<-ALL CHANGED BY ME

MaxExamineSanity = "1"

InsanityArea_CheckTimeMin = "1"
InsanityArea_CheckTimeMax = "1"
-----------------------------------------
5- Scripted it 5 times different like this for example:
void OnEnter() and i also did put these lines below on void OnSTART()
{
SetInsanitySetEnabled("hud1", false); <--- IS one of the other custom huds
SetInsanitySetEnabled("hud2", false); <--- IS one of the other custom huds
SetInsanitySetEnabled("MagnifierGlass", false); <--- IS one of the other custom huds
SetInsanitySetEnabled("hud3", true);<--- IS one that SHOULD work...........
}
---SCRITPT---
void GoPhonescript(string &in asEntity)
{
SetInsanitySetEnabled("hud1", false);
SetInsanitySetEnabled("hud2", false);
SetInsanitySetEnabled("MagnifierGlass", false);
SetInsanitySetEnabled("hud3", true);
SetPlayerActive(false);
FadeOut(1);
StartRandomInsanityEvent();
}

IT ONLY WORKS RANDOM... WHYYYYYYYYYYY?!??!??!
---
If someone could help me and others here around!
There must be something or someway how this hould work,
The guy : PALISTOF created a hud in HORIZON .. saw the video's.
I asked him a couple of times, but he isnt responding for weeks now.. so i gave up...
MODERATOR\JENS\ANOBODY...
---
If we could fix this i can continue this fc...
or it will be very weird if you need a "tool"-HUD in game and it doesnt work.... that looks SO silly, you will see when it is finished!
Ok, enough of this WALL OF TEXT!
Hopefully we can manage this and work this thing out!
Or,
i am screwed like many more who wants their own hud.

IS there maybe a hidden scriptline like this:
StartRandomInsanityEvent("PUTYOURHUD\SANITYEVENTHERE???");
(This post was last modified: 07-09-2013, 06:29 PM by DnALANGE.)
07-09-2013, 06:27 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#10
RE: JENS OR ANYBODY who has all knowlege of SANITYEVENTS\HUDS.HELP!!!

I guess it only works randomly, because that's what it's intended to be. Working randomly.

Trying is the first step to success.
07-09-2013, 07:14 PM
Find




Users browsing this thread: 3 Guest(s)