Replies: 10 (Who?), Viewed: 762 times.
Theorist
Original Poster
#1 Old 5th Jul 2020 at 6:12 PM Last edited by Sunrader : 5th Jul 2020 at 10:13 PM.
Default Help with changing placement of Maxis shrub
I would like to make the hula girl shrub walk around-able, ideally by default even if it's already placed on lots.

1) I have cloned it and added to the correct BHAV (the first one in OBJF) what I assume are correct placement flags, the one that says they can be stepped over and the one that allows object intersection, shown below. I added these because those are the ones used by S-D's walk around OMSP. But it does not work at all. The sim still stands there unable to walk past it. Are these the correct placement flags and am I adding them correctly?

2) Ideally, I'd also like this to work without rebuying the shrubs already on lots, because I have a huge garden using these as a border and would like them to change to walk around them if at all possible. How do I change the way it is initialized once I get it working?

3) Usually, I would just extract the BHAV that is relevant but this causes it to have an unknown BHAV. I have tried also extracting the GLOB which prevents it from doing that, but that has not worked either. Why would I not be able to extract only the init bhav?

EDIT: I noticed after posting that the sort and links were all screwy, so I fixed those, I think. New pic attached.
Screenshots
Advertisement
Theorist
#3 Old 5th Jul 2020 at 8:41 PM
You mentioned that you don't want to rebuy the objects, so are you testing your code with a shrub that's already been purchased? If so, that's why it's not working. The init runs once, at purchase, and never again unless you force error on the object. If the shrub has a function load, you can put your code in there, and the shrub should load it without having to be sold and rebought.
Theorist
Original Poster
#4 Old 5th Jul 2020 at 10:13 PM
Quote:
Originally Posted by omglo
You mentioned that you don't want to rebuy the objects, so are you testing your code with a shrub that's already been purchased? If so, that's why it's not working. The init runs once, at purchase, and never again unless you force error on the object. If the shrub has a function load, you can put your code in there, and the shrub should load it without having to be sold and rebought.


Thanks @omglo, no, I was buying new ones for testing because I know it doesn't usually work that way.

What does "the shrub has a function load" refer to? Sounds promising, but I'm not familiar with it. Where would I find it?

Quote:
Originally Posted by HugeLunatic
Try adding allow sim intersection, then they should walk through them.


Thanks, I'll try. I thought about that, but the walk through OMSPs have it and the walk around OMSPs don't, so I didn't. I'm really hoping they will walk around, rather than through, but I'll try it.
Theorist
#5 Old 5th Jul 2020 at 10:21 PM
The function load is a BHAV, if it's there you'd see it with the Function Main and Function Init. If it's not there, you should be able to make one, the same way you'd make any other BHAV. The only different step is that you have to go to the Object Functions (OBJf), click "load" and type the instance number of your new line in the Action BHAV box and commit. Of course, that's not going to solve the current issue, but once you get it working, you can put your code here, so you won't have to sell and buy your shrubs again.
Theorist
Original Poster
#6 Old 5th Jul 2020 at 10:34 PM
Quote:
Originally Posted by omglo
The function load is a BHAV, if it's there you'd see it with the Function Main and Function Init. If it's not there, you should be able to make one, the same way you'd make any other BHAV. The only different step is that you have to go to the Object Functions (OBJf), click "load" and type the instance number of your new line in the Action BHAV box and commit. Of course, that's not going to solve the current issue, but once you get it working, you can put your code here, so you won't have to sell and buy your shrubs again.


Ok, thank you. I will figure that out. Good to know! Do you happen to know an object that has one so I can see an example?

The walk through does work now, with HL's suggestion, so, I guess, in general, this works ok. Still not sure why they don't walk around....
Theorist
#7 Old 5th Jul 2020 at 11:02 PM
Dancing Flamingo
staff: administrator
#8 Old 5th Jul 2020 at 11:44 PM
Is there a reason your changing the placement?   I tried this with just the can step over as well as the object intersection added and it works as intended, the sims weaves through them.

So for what omglo mentioned with the load bhav.

Clone the init behave, change the name to load and give new instance number. Have the can step over and the object intersection as the only two lines in the load bhav, and leave the init bhav to be the single line.

Then choose the OBJF, and in the third line where the function is load, choose your newly created bhav as the action bhave (choose arrow to right).
Theorist
Original Poster
#9 Old 6th Jul 2020 at 7:39 AM
Quote:
Originally Posted by HugeLunatic
Clone the init behave, change the name to load and give new instance number. ... Then choose the OBJF, and in the third line where the function is load, choose your newly created bhav


Very useful info, thanks. This part works now, though I can only get them to walk through not around for some reason.
Dancing Flamingo
staff: administrator
#10 Old 6th Jul 2020 at 10:30 PM
Theorist
Original Poster
#11 Old 8th Jul 2020 at 1:18 AM
I think maybe it depends how they are placed, in that it's how it looks? But, ultimately, for me, they walk through.

One interesting bit, I did manage to add the load bhav, so all the bushes on a huge lot, where there were many of them, did change automatically, and that was lovely, but, what I didn't expect is, after that, I accidentally removed the mod and they continued to allow walk through. Not sure what that's useful for, but I don't need the mod in for the placement change to stay in effect, so interesting info.
Back to top