Faux Neon Sign is screwy when placed in a window :(
|
#21
10-05-2013
OMG thank you Honey!! Sheesh, can't believe it was such a simple thing. Thank you thank you!!
Nope, didn't want anything done with the windows, just posted them in case anyone wanted to test the transparency stuff or something.
* fanseelamb smooches Honey and Nix and DutchX and Lee for all their help
Nope, didn't want anything done with the windows, just posted them in case anyone wanted to test the transparency stuff or something.
* fanseelamb smooches Honey and Nix and DutchX and Lee for all their help
#22
11-05-2013
Hmm. Just got time to test Honey's fixed version and now the sign can be placed over windows without cheats (yay!) BUT doesn't require a wall behind it. So it can be placed in midair without cheats and doesn't go down with walls. I'm guessing it would require curtain globals to have it stick to walls and be placeable over windows at the same time. I think I'll just keep the first version which sticks to walls and goes down with them. To me, using a cheat to place over windows is less of an annoyance than the sign not going down with walls and allowing itself to be placed in midair.
BUT all this BHAV info helped me improve another project. Behold, the incredible InvisiLamps! Two super-low-poly lights for illuminating photos and videos. You can see them from above to grab, place, and delete, but get below them and they disappear from view. Thanks to your BHAV lessons I was able to make them intersectable by sims and objects, and placeable virtually anywhere without cheats - indoors, outdoors, over out-of-bounds roads, pools, ponds, slopes, and in low-roofed attics. The only places I haven't been able to figure out are beaches (over the sand and water) and common areas of apartment lots. Can't find BHAVs for those anywhere in the lighting Inits. OFC you can always place them with cheats so if it's not fixable it's not a big deal.
I also can't figure out how to get the thumbnail for one of 'em to work. It was cloned from a floor light (to provide light from below). I moved the mesh up to the ceiling and now the thumbnail shows nothing... just a blank square. Silly me thought it'd be simple enough to fix that, but yeah... nope. LOL. Again it's not a huge deal since it's pretty clear what it is from the $0 cost and the title, and it's not much to look at anyway. Perhaps if I clone the ceiling light and change the lighting point info. That might make it basegame compatible too (was cloned from an OFB light so apparently requires that).... I'll give that a shot later.
If you guys happen to have suggestions for any of those issues I'd love to hear 'em. If they can't be fixed I think both projects are still decent enough to upload as-is.
(The red glow in the pics is not from the lights, btw, it's spilling out the not-truly-blacked-out windows from inside the club.)
BUT all this BHAV info helped me improve another project. Behold, the incredible InvisiLamps! Two super-low-poly lights for illuminating photos and videos. You can see them from above to grab, place, and delete, but get below them and they disappear from view. Thanks to your BHAV lessons I was able to make them intersectable by sims and objects, and placeable virtually anywhere without cheats - indoors, outdoors, over out-of-bounds roads, pools, ponds, slopes, and in low-roofed attics. The only places I haven't been able to figure out are beaches (over the sand and water) and common areas of apartment lots. Can't find BHAVs for those anywhere in the lighting Inits. OFC you can always place them with cheats so if it's not fixable it's not a big deal.
I also can't figure out how to get the thumbnail for one of 'em to work. It was cloned from a floor light (to provide light from below). I moved the mesh up to the ceiling and now the thumbnail shows nothing... just a blank square. Silly me thought it'd be simple enough to fix that, but yeah... nope. LOL. Again it's not a huge deal since it's pretty clear what it is from the $0 cost and the title, and it's not much to look at anyway. Perhaps if I clone the ceiling light and change the lighting point info. That might make it basegame compatible too (was cloned from an OFB light so apparently requires that).... I'll give that a shot later.
If you guys happen to have suggestions for any of those issues I'd love to hear 'em. If they can't be fixed I think both projects are still decent enough to upload as-is.
(The red glow in the pics is not from the lights, btw, it's spilling out the not-truly-blacked-out windows from inside the club.)
#23
11-05-2013
Honeywell;19390 Wrote:(the wall placement flags needed to be cleared in order for the intersect flags to work).
Yes, that's why I said my instructions were to generic. You always have to check the existing lines in case you create a conflict and clear those first.
As for things going down with walls, you can add that one in the init as well: My | Flags | Set Flag | Literal | Hide for cutaway. It should end up like this: [prim 0x0002] Expression (My 0x0008 (flags) Set Flag flag# Literal 0x000B (hide for cutaway)).
For placement on water, it's: My | Placement Flags | Set Flag | Literal | Allow on water Surface. It should end up like this: [prim 0x0002] Expression (My 0x002A (placement flags) Set Flag flag# Literal 0x000F (allow on water surface)).
Beach... I don't know. Never tried that one (yet).
And those who were seen dancing were thought to be insane by those who could not hear the music. -- Friedrich Nietzsche
#24
11-05-2013
fanseelamb;19388 Wrote:Oh no, wait! DutchX your instructions were VERY helpful to me!Do you still have them? I'd like to keep them for future reference.Luckily I still had the tab open so will save them for future reference.
Sorry I deleted it and then went to bed. For next time, here's a somewhat better explanation (I hope). I'm nowhere near an expert and usually just mess around. If anyone sees nonsense in this post, please tell me so I can change it.
Editing the BHAV (Behaviour Function)
Sometimes there isn't a BHAV in the package at all. If that's the case, you need to add it first:
1) Open GLOB in the resource tree and check what semi-global library it's using. (In your case, it was probably 'PaintingGlobals' since you cloned from a painting.)
2) Go to the menu 'Tools' > 'Object Tools', and then 'Import Semi Globals'.
3) Select 'PaintingGlobals' from the dropdown menu and select 'Scan'.
4) A list appears. Select 'Uncheck all'. The BHAV usually needs just 2 things: something with ‘main’ and something with ‘init’.
5) Scroll down and find those. Sometimes there are more lines called 'init'. In that case, find the one called 'Function - init (Behavior Function).
6) Check and import those into your package. A popup appears and you want to save.
7) Make sure the goups are set to 0xFFFFFF and write down the numbers under ‘instance’.
8) Go to OBJF in the resource tree. Fill in the numers you just wrote down. Main with main, and init with init. Set the rest to 0x0, as they are pointing to not existing BHAV’s if Main and Init is all you imported. (I think?)
Now, you can make the object intersectable.
Editing the BHAV
1) Select BHAV.
2) Select 'init'.
3) Click the 'Sort' Button to sort out all the lines.
4) Check all the behaviors listed there and see if there’s anything set about ‘My Flags' or ‘My Placement Flags’. If so, check them out for possible conflicts. You want the object to be placed on a locked tile, and for it to be intersectable. If there’s something along the lines of these 2 options, you can change them into:
- My / flags / Set Flag / Literal / allow object and person intersection
- My / placement flags / Set Flag / Literal / allow on locked tile
If there is a lot of stuff going on and you can't figure it out, you can always 'clear' the behaviors and add new lines, just like Honeywell probably did in your package, but I rather change the existing ones. (Although I'm not sure if that's the wisest idea or if it's even allowed? So far it worked out fine for me, though.)
If you can’t find anything that looks like a possible conflict, you have to add the lines yourself, see the next part of this post.
Adding behavior lines and linking the new behavior
You need to link the new behavior to the rest of the lines, otherwise it will never be called.
1) Find the end of the behaviors (by following the green lines) and click on that line (it doesn't always have to be one at the bottom).
2) Check 'Special Buttons' and new buttons appear.
3) Click the button 'ins/true' and a new line appears, linking the 'last' line (the end of the behaviors) to your new one, meaning that this new line will be called as well.
4) Click on the new line you just added, and make sure the OpCode box is set to 0x0002 (which is Expression).
5) Click the small square button to the right that shows a hammer/wrench.
6) In the pop up box set the values as shown:
- My / flags / Set Flag / Literal / allow object and person intersection.
7) Commit.
8) Do the same thing again to add another line (making sure the green arrow goes on) and set that one like this:
- My / placement flags / Set Flag / Literal / allow on locked tile
8) Click ‘Commit file’ and save.
And... that's it. It's usually a bit of a puzzle, and you have to understand the existing behaviors otherwise things might conflict, but this is generally the idea.
And those who were seen dancing were thought to be insane by those who could not hear the music. -- Friedrich Nietzsche
#25
11-05-2013
YES!!! When all else fails, trick the game.
After trying everything I could think of to make my test painting both intersectable and requiring a wall behind it, I decided to cheat. So I replaced the painting's Init with a curtain Init and added the curtain's BHAV for intersection just to be on the safe side - and it works! And Fansee, you can do it without being BHAV-savvy, I promise.
This is what you do:
1. Go to Tools -> Object Tools -> Import Semi Globals. In the list, find Curtain Globals and click "scan".
2. Uncheck all except SG: Function - Allow Intersection? and SG: Init. Click the Import button.
3. Now, when you look under Behaviour Functions to the left, you'll see that these two BHAVs have been added to your package. You also have the original "Function - Init" and "Function - Main".
Check to make sure that the new BHAVs' group number is 0xFFFFFFFF. Then, change the name of the one called SG: Init to Function - Init, and commit. Then change the instance number (under the Resource tab) to the same instance number as your original Init. Commit again, and then delete the original Init - that's the one that isn't in italics (right click -> Delete). You don't have to do anything with the SG: Function - Allow Intersection? BHAV (you can change its name to just "Function - Allow Intersection" if you want, though), but take note of its instance number.
4. Now go to the OBJf. Click on the "allow intersection" line (see, you were on the right track before), and enter the Allow Intersection BHAV's instance number in the "Action BHAV" box to the right. Commit and save.
And now you should have a painting that behaves like a curtain and can intersect other objects including windows, requires a wall behind and goes down with walls.
I've attached my test painting for reference; it's predictably found under Deco -> Paintings. (Re the file name, "testtavla" = test painting in Swedish. Yeah, I'm imaginative like that. )
After trying everything I could think of to make my test painting both intersectable and requiring a wall behind it, I decided to cheat. So I replaced the painting's Init with a curtain Init and added the curtain's BHAV for intersection just to be on the safe side - and it works! And Fansee, you can do it without being BHAV-savvy, I promise.
This is what you do:
1. Go to Tools -> Object Tools -> Import Semi Globals. In the list, find Curtain Globals and click "scan".
2. Uncheck all except SG: Function - Allow Intersection? and SG: Init. Click the Import button.
3. Now, when you look under Behaviour Functions to the left, you'll see that these two BHAVs have been added to your package. You also have the original "Function - Init" and "Function - Main".
Check to make sure that the new BHAVs' group number is 0xFFFFFFFF. Then, change the name of the one called SG: Init to Function - Init, and commit. Then change the instance number (under the Resource tab) to the same instance number as your original Init. Commit again, and then delete the original Init - that's the one that isn't in italics (right click -> Delete). You don't have to do anything with the SG: Function - Allow Intersection? BHAV (you can change its name to just "Function - Allow Intersection" if you want, though), but take note of its instance number.
4. Now go to the OBJf. Click on the "allow intersection" line (see, you were on the right track before), and enter the Allow Intersection BHAV's instance number in the "Action BHAV" box to the right. Commit and save.
And now you should have a painting that behaves like a curtain and can intersect other objects including windows, requires a wall behind and goes down with walls.
I've attached my test painting for reference; it's predictably found under Deco -> Paintings. (Re the file name, "testtavla" = test painting in Swedish. Yeah, I'm imaginative like that. )
#26
11-05-2013
Brilliant, Nix.
(That's why I asked about the initial decision to clone from a painting instead of a curtain. I usually clone with behavior in mind, not the shape of the mesh, because it's usually easier to change the shape of an object than messing with BHAV's. Still, this way, Fansee has the best of both worlds; the shape of a painting and the behavior of a curtain. Nice!)
(That's why I asked about the initial decision to clone from a painting instead of a curtain. I usually clone with behavior in mind, not the shape of the mesh, because it's usually easier to change the shape of an object than messing with BHAV's. Still, this way, Fansee has the best of both worlds; the shape of a painting and the behavior of a curtain. Nice!)
And those who were seen dancing were thought to be insane by those who could not hear the music. -- Friedrich Nietzsche
#27
11-05-2013
Thanks! I agree re the cloning, that's how I usually do it as well - now. But when I was an object newb, I usually went for form over function and cloned something that looked good - and then cried blood when I realised I'd have to start all over again because the pretty object I'd cloned from wasn't good for what I wanted it to do at all. You live and learn, as they say.
#28
11-05-2013
So clever, Nix!
fansee, you can try adding this line for your lights and see if that works. Just plugin the value for lights instead of garden plot. You can almost always see it used in the original bhavs to get the values for lights or I'm pretty sure there's a Wiki at MTS that lists them all (I would link you to them but I can never find anything again over there.)
No clue what to try on your beach lots since it sounds like you've already added locked tiles, terrain and water... maybe try lava just for fun? I don't have any idea where to even look to see how they've coded lots.
fansee, you can try adding this line for your lights and see if that works. Just plugin the value for lights instead of garden plot. You can almost always see it used in the original bhavs to get the values for lights or I'm pretty sure there's a Wiki at MTS that lists them all (I would link you to them but I can never find anything again over there.)
No clue what to try on your beach lots since it sounds like you've already added locked tiles, terrain and water... maybe try lava just for fun? I don't have any idea where to even look to see how they've coded lots.
#29
12-05-2013
OMG, BHAV lessons and Swedish lessons all in the same thread. This place is the BEST!
@Nix: Eeee!! It worked it worked!!! The sign now sticks to walls and is placeable in windows without cheats. Thank you so very much!
@DutchX: Yeah, guess I should have started by cloning a curtain. Honestly I didn't even think of that. I was focused on attempting to get the sign to look decent and glow a bit. When that part actually worked I was focused on getting the window transparency conflict fixed. It wasn't until after all that when the placement issue even occured to me. I'm still very much a newb at object making. Thank you so much for all the valuable info and step by step instructions!
@Honey: Argh! I had found that "Ignore Apt Restriction" thingie but didn't know to change the value for lights, so it didn't work. Errr.... haven't been able to find the light value yet but I will keep looking. And will be sure to try lava just for fun.
Again, thank you all! Such a helpful group.
* fanseelamb continues on her quest to fix these dang lights
@Nix: Eeee!! It worked it worked!!! The sign now sticks to walls and is placeable in windows without cheats. Thank you so very much!
@DutchX: Yeah, guess I should have started by cloning a curtain. Honestly I didn't even think of that. I was focused on attempting to get the sign to look decent and glow a bit. When that part actually worked I was focused on getting the window transparency conflict fixed. It wasn't until after all that when the placement issue even occured to me. I'm still very much a newb at object making. Thank you so much for all the valuable info and step by step instructions!
@Honey: Argh! I had found that "Ignore Apt Restriction" thingie but didn't know to change the value for lights, so it didn't work. Errr.... haven't been able to find the light value yet but I will keep looking. And will be sure to try lava just for fun.
Again, thank you all! Such a helpful group.
* fanseelamb continues on her quest to fix these dang lights
#30
12-05-2013
Off topic a bit here; but I just wanted to say, Damn! I love this site and the way everyone is willing to help each other and share their knowledge. I can't believe how much I have learnt just by reading threads like this one. Thanks guys.
You can find more of my work at Mod The Sims and Plumb Bob Keep.