- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Object Creation >
- Object Creation Workshop & Repair Center >
- auto lights on door not working
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Object Creation >
- Object Creation Workshop & Repair Center >
- auto lights on door not working
Replies: 1 (Who?), Viewed: 3482 times.
#1
3rd Dec 2006 at 11:21 PM
auto lights on door not working
Hi all,I'm currently working on some holiday stuff namely a pet basket and a door with light interactions.
while the auto lights appear to be working on the pet basket - I tested for 3 sim days and they turned on and off at the appropriate time testing cheats returns 2 different errors: Couldn't find object ref occurs when switching to life mode, when sim goes whats this and when pet exits basket. Undefined Transition occurs when pet exits basket.
any idea what I should do about these errors?
my biggest prob though is that when applying the same interactions to a door the auto lights do not work at all. no game crashing, freeze of time or error logs either.
would be too cool if you could have a look!
thanks in advance!
Attached files:
holiday stuff.rar (210.5 KB, 9 downloads) - View custom content | ||
Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- ObjectError_N003_t51706.txt 26275 6362 24% 03-12-06 22:56 .....A. 7B2EAFBC m3c 2.9 chrissy6930_holidayluxuryglassdoor.package 157156 19074 12% 03-12-06 14:09 .....A. B328D273 m3c 2.9 chrissy6930_holidaypetpillowexpensive.package 229300 71487 31% 03-12-06 22:27 .....A. 265C4BD5 m3c 2.9 ObjectError_N003_t46908.txt 26861 6462 24% 03-12-06 22:55 .....A. 130E6B63 m3c 2.9 ObjectError_N003_t47599.txt 28795 6610 22% 03-12-06 22:56 .....A. 62E9F087 m3c 2.9 ObjectError_N003_t51705.txt 27938 6495 23% 03-12-06 22:56 .....A. 0985CFA1 m3c 2.9 chrissy6930_luxurywindow.package 149687 98502 65% 24-09-06 13:28 .....A. 8E286FA9 m3c 2.9 ------------------------------------------------------------------------------- 7 646012 214992 33% |
Advertisement
#2
4th Dec 2006 at 12:23 AM
Chrissy, let me explain something about the "Autolight" feature.
It is not a feature built-in in the game, that automatically turns on and off all the light in the lot. The Maxis lamps have the autolight feature because:
1) they are assigned to the category "lamps" (in the Init there is a line "My Category := Const 0x0106:0x17")
2) the "Function - Main" BHAV called from the OBJF either is the semiglobal one, taken from the LampGlobals, or is a private one that calls the semiglobal one.
3) the semiglobal "Function - Main" continuously reads the time of the day, and changes the state of the lamp accordingly.
4) Whenever you invoke, on a Maxis lamp, the interaction ".../This Room" or ".../All Lights", the corresponfing BHAV scans all the objects in the room or lot, looking for any object assigned to category "lamp", and then turns it on/off/auto.
So, why your light doesn't work? The truth is that it actually *works*, but only when you manually select the interaction "Autolight": only when you do this, the BHAV checks the time of the day and sets the light state accordingly; in every other moment, the pet bed just stays idle, and does nothing (so, it never check the time of the day).
What you need to do, is to examine the "Function - Main" BHAV from the LampGlobals and transfer part of its code into your private "Function - Main".
It's not an easy job, because the semiglobal Function.Main, in turn, calls other semiglobal functions from the LampGlobals, so before doing anything, I suggest you to clone a Maxis lamp and study its code with SimPE. And when you are ready, import the LampGlobals you might need into your package, and do the needed corrections.
Lastly, as for the error logs you attached, they are caused by the fact that only the "lead tile" is the actual object; the other tiles are just cosmetic. therefore, generally they should have not functions at all, beside the Init.
I've cleaned up the two "non-lead" OBJF from all the BHAV references, except the Init; and I get no errors. Do the same, and then check if it works fine with pets, and if you can clean it correctly.
PS: what explained above applies to the doors, too, and to any other non-lamp object, including... modular stairs I had a hard job when I had to implement the Autolight feature on the Carina stairs
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
It is not a feature built-in in the game, that automatically turns on and off all the light in the lot. The Maxis lamps have the autolight feature because:
1) they are assigned to the category "lamps" (in the Init there is a line "My Category := Const 0x0106:0x17")
2) the "Function - Main" BHAV called from the OBJF either is the semiglobal one, taken from the LampGlobals, or is a private one that calls the semiglobal one.
3) the semiglobal "Function - Main" continuously reads the time of the day, and changes the state of the lamp accordingly.
4) Whenever you invoke, on a Maxis lamp, the interaction ".../This Room" or ".../All Lights", the corresponfing BHAV scans all the objects in the room or lot, looking for any object assigned to category "lamp", and then turns it on/off/auto.
So, why your light doesn't work? The truth is that it actually *works*, but only when you manually select the interaction "Autolight": only when you do this, the BHAV checks the time of the day and sets the light state accordingly; in every other moment, the pet bed just stays idle, and does nothing (so, it never check the time of the day).
What you need to do, is to examine the "Function - Main" BHAV from the LampGlobals and transfer part of its code into your private "Function - Main".
It's not an easy job, because the semiglobal Function.Main, in turn, calls other semiglobal functions from the LampGlobals, so before doing anything, I suggest you to clone a Maxis lamp and study its code with SimPE. And when you are ready, import the LampGlobals you might need into your package, and do the needed corrections.
Lastly, as for the error logs you attached, they are caused by the fact that only the "lead tile" is the actual object; the other tiles are just cosmetic. therefore, generally they should have not functions at all, beside the Init.
I've cleaned up the two "non-lead" OBJF from all the BHAV references, except the Init; and I get no errors. Do the same, and then check if it works fine with pets, and if you can clean it correctly.
PS: what explained above applies to the doors, too, and to any other non-lamp object, including... modular stairs I had a hard job when I had to implement the Autolight feature on the Carina stairs
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
I *DON'T* accept requests, sorry.
Who Posted
|