View Full Version : Darkening rooms in a lot
24th Jun 2012, 11:44 PM
I'm making an object mod and I have a little issue. The object in question is a door at which I added an interaction. The thing I want to do is to darken all the rooms in the lot except the one the Sim clicked the interaction on its door and some other rooms. The effect I would like to get is the same as the effects there is in the hidden rooms of skyscrapers in Late Night.
Does anyone have any suggestion or advice?
I'm not actually a pro in modding, I'm still learning. :faceslap:
Thank you so much for your patience! :)
26th Jun 2012, 6:43 AM
That effect is achieved with hidden room markers. I don't know if you can use that to help you. But it seem like you could tell the interaction to copy the effects? Possibly this would require the creation of a totally new marker?
30th Mar 2013, 1:42 PM
Does anyone have a clearer explaination?
30th Mar 2013, 2:16 PM
How about a tomb marker? They can turn the hiding effect on or off dependign on various conditions.
30th Mar 2013, 10:27 PM
I thought about it, but my goal is to make a room unfog when I click on an interaction that I have created, which doesn't appear in the normal tomb activators for the room marker.
30th Mar 2013, 11:20 PM
I had not tested it, but looks in "Sims3.Gameplay.Controllers.TombRoomManager".
Particularly : "void SetOpacity(GameObject gameObject, float opacity, float transitionTime)"
31st Mar 2013, 12:56 AM
I had a look at that.
What that method actually does is hiding one object, but I'd need to darken an entire room.
Objects hiding would be useful as well, but I don't know how hide all the objects that the choosen room contains.
I would be really grateful if you or someone else could give me some more practical examples (I'm still not a pro in modding :cry: )
31st Mar 2013, 1:14 AM
The SlidingBookcase has a FogThisRoom() function, which might be helpful. Though it seems to use an EP7 object called "fogLocator". There's also the WA version FogRoomWithTombRoomMarker(TombRoomMarker marker) in the above mentioned TombRoomManger.
31st Mar 2013, 2:17 AM
Thank you so much, I think I really found what I needed.
Just one really silly question that you could expect just for a complete nincompoop like me: I am working on a script that basically adds an interactions to a door. I want, when you click the interaction, the room adjacent to the door to unfog. Though, how do I put that function (FogRoomWithTombRoomMarker) in my code? Do I have to create a new particular class? Can you give me some practical explanations?
My code is made up like this:
main class (KalimeroDoor : DoorSingleCountry)
public void OnStartup()
It's actually one of the question that I've been asking myself for a long time... how do I put all the methods that I can see in the classes in Reflector into my code? I have read all the tutorials but still don't get it.
Sorry for the completely noob question :help: :rolleyes:
Hope someone can help me!
31st Mar 2013, 9:44 AM
Well there are two approaches. One is to "inject" an extra interaction on all doors. My own approach is always to make a new object or set so that lots and objects not involved in the mod are unaffected. I guess I'd probably be looking at cloning a door and giving it it;s own scriptclass and cloning a tomb marker and giving it its own scriptclass (each either derived from or copied from the original depending just how different I wanted them). Then I would tailor them to specially work together.
31st Mar 2013, 9:45 AM
You'll have to add the Sims 3 .dlls as references in your project, see also this page on the wiki (http://modthesims.info/wiki.php?title=Sims_3:Creating_a_game_compatible_Visual_Studio_project).
You might also need to unprotect your game .dlls first. See this tool (http://www.den.simlogical.com/denforum/index.php/topic,1689.0.html).
31st Mar 2013, 11:20 AM
OK, I think I got the theory, but I still don't get how to do all the things you've written practically. Are thete any examples to follow? I especially don't know how to make the Fog function work in my door class...
22nd Apr 2013, 7:00 PM
Can somebody help me?
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.