- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Sit for more than five seconds (script mod)
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Sit for more than five seconds (script mod)
Replies: 4 (Who?), Viewed: 516 times.
#1
3rd Jul 2021 at 9:05 PM
Sit for more than five seconds (script mod)
Hi everyone, I'm making a mod for sims to stay seated longer (you know, more than five sim seconds with high free will ^^)I called the interaction "relax" and for now it's available on dining chairs, living chairs and sofas. It's working, sims will stay seated for 2 sim hours (it's tunable) and just as I wanted, if you ask other sims to join you they will chat, which I find very enjoyable.
- I've seen two problems so far. First, as you can see on the picture, the interaction appears three times. Does anyone know what could be the reason?
- Second, I notice a lot of errors when sims try to use dining chairs, living chairs and sofas for other interactions... They reset and I don't know why it does so.
As always, thank you for anyone willing to test the mod and give advices, it helps a lot
Attached files:
FloTheory_NapInAllChairsV2.7.package.7z (10.6 KB, 4 downloads) |
Advertisement
#2
4th Jul 2021 at 12:35 PM
Posts: 3,860
Thanks: 8546 in 67 Posts
I think I might know what the first problem is, but I'll have to check the package first to see it (will do that soon!)
Regarding the resetting... does error trap or any try/catch exception tell you what it is? Or is it just resetting and then no errors?
Regarding the resetting... does error trap or any try/catch exception tell you what it is? Or is it just resetting and then no errors?
#3
4th Jul 2021 at 4:34 PM
Quote: Originally posted by Lyralei
I think I might know what the first problem is, but I'll have to check the package first to see it (will do that soon!) Regarding the resetting... does error trap or any try/catch exception tell you what it is? Or is it just resetting and then no errors? |
Thank you for your help! About the reseting, error trap does report errors but I need to investigate more because it quotes a lot of things in the report. I'll look into it more.
#4
5th Jul 2021 at 4:15 PM
Posts: 3,860
Thanks: 8546 in 67 Posts
I think i found the reason why it's showing it 3 times, the relax that is
On your OnWorldLoadHandler you actually have ChairLiving twice:
And then on your 'OnNewObject' you check if it's a ChairLiving type but not the others, meaning that chair gets the third interaction now :p
Regarding that second issue... What I tend to do is on each line I put a notification that counts up basically So:
It's tedious but you do easily track down then where the resetter is and it just makes it easier to check if particular variables do return something for you. Especially since your Run function is pretty huge
On your OnWorldLoadHandler you actually have ChairLiving twice:
Code:
List<ChairLiving> list = new List<ChairLiving>(Queries.GetObjects<ChairLiving>()); foreach (ChairLiving item in list) { AddInteractions(item); } EventTracker.AddListener(EventTypeId.kBoughtObject, OnNewObject); List<ChairDining> list2 = new List<ChairDining>(Queries.GetObjects<ChairDining>()); foreach (ChairDining item2 in list2) { AddInteractions(item2); }
And then on your 'OnNewObject' you check if it's a ChairLiving type but not the others, meaning that chair gets the third interaction now :p
Regarding that second issue... What I tend to do is on each line I put a notification that counts up basically So:
Code:
blahblah print(1); blahblah print(2);
It's tedious but you do easily track down then where the resetter is and it just makes it easier to check if particular variables do return something for you. Especially since your Run function is pretty huge
#5
6th Jul 2021 at 11:37 AM
Thank you very much, I will look at everything you said
Who Posted
|