PDA

View Full Version : Walking Through Objects?


Fresh-Prince
3rd Sep 2007, 3:13 AM
Hey Guys! I need some help! lol. :) I would like to make one of my objects so that sims can walk through it, instead of sims just stopping when they reach the object. I couldn't really find a tutorial or something that would explain how to fix this sort of problem. I cant really tell or show the object, cause it's part of a secret project ;) Anyways, any help or words are greatly appreciated! Thanks so much! :D

Jasana_BugBreeder
3rd Sep 2007, 7:17 AM
You can change Init BHAV - add 'allow object intersection' flag to tiles that have to be passable:
[prim 0x0002] Expression (My 0x0008 (flags) Set Flag flag# Literal 0x0005 (allow person intersection))

Or you can edit 'footprint' block in CRES - put 00's where object should be passable; this way would be better if you have complex footprint shape.
Looks like Atavera had deleted his post explaining how to edit this block :(
I hope noone would be offended if I copy here the content of that post which I had saved a while ago :o
Basically you will need to go to the footprint block(a cDataListExtension) of the CRES and edit its array. Adjust the first 4 elements(min/max for x,y) values to the dimensions of your object(assuming you added tiles). Then add Binary type elements for each tile with a title of their position(ex. "(2,0)" or "(2,1)"). Then draw out the footprint mask for the added tiles in binary 16x16 digits, example(rounded object, 2 corners of tile partially walkable):
0000000000000000
1111111111110000
1111111111111100
1111111111111110
1111111111111110
1111111111111110
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111110
1111111111111110
1111111111111100
1111111111110000
0000000000000000

Split your tile into 2 8-digit columns:
00000000 00000000
11111111 11110000
11111111 11111100
11111111 11111110
11111111 11111110
11111111 11111110
11111111 11111111
11111111 11111111
11111111 11111111
11111111 11111111
11111111 11111111
11111111 11111110
11111111 11111110
11111111 11111100
11111111 11110000
00000000 00000000
Convert each 8-digit block to Hexadecimal:
00 00
FF F0
FF FC
FF FE
FF FE
FF FE
FF FF
FF FF
FF FF
FF FF
FF FF
FF FE
FF FE
FF FC
FF F0
00 00
Then arrange your bytes into groups of 4 all on 1 line like it is in SimPE:
00 00 FF F0 FF FC FF FE FF FE FF FE FF FF FF FF FF FF FF FF FF FF FF FE FF FE FF FC FF F0 00 00

Inge Jones
25th Sep 2007, 12:22 PM
I have a small question - which way is the green arrow of the tile assumed to be pointing in relation to the tile's footprint pattern. Ie in stage 1, would the arrow be pointing towards the rounded corner, or some other direction? I hope this makes sense lol!

Jasana_BugBreeder
25th Sep 2007, 1:21 PM
Eww... If I remember correctly :-<
Green arrow points to the same direction as Y axis. Tile numbers are (X, -Y) - I mean, first number grows in the same direction as X axis, second number grows in opposite direction as Y axis. Something like this:
^^^^^^^
(0,0) (1,0)
(0,1) (1,1)

However, since the game has this weird axis system - tiles are arranged a bit differently when you write footprint. Imagine that you are looking at the object from bottom view. The tiles will go like
(1,0) (0,0)
(1,1) (0,1)
At least this variant worked properly for me when I was doing the round cabinet from the Round Clothed Curvy set :)

Inge Jones
25th Sep 2007, 2:10 PM
What I really meant was that when you are drawing your bitmap grid for one tile, is it the top line of 1s and 0s that the arrow is pointing to?

Jasana_BugBreeder
25th Sep 2007, 3:38 PM
No, that entire block of 1s and 0s correspond to single tile, so for multi-tile you'll have multiple blocks.

Inge Jones
25th Sep 2007, 4:09 PM
Still didn't explain myself properly :D Supposing it's only a one-tile object - which means just the one green arrow on the ground - which row or column of the 1s and 0s block for that tile corresponds to the tip of the green arrow?

Jasana_BugBreeder
25th Sep 2007, 6:24 PM
Still didn't explain myself properlyNo, it's me who understands wrong :(
The bottom line corresponds to the tip.

Inge Jones
25th Sep 2007, 8:16 PM
Thanks :D Sometimes written words are just not enough - do you think that's why people have developed the technique of waving their arms when they talk in person? :)

Inge Jones
27th Sep 2007, 10:36 PM
Just reporting back that the "update footprint" turned out to be the solution, so thank you for that, my towels are working now :)

The only slight, but more or less insignificant, thing is that the sim who is actually on the towel doesn't seem to work out she can walk over it to get off until she has had time to consider what her next autonomous action will be - when the sunbathe icon leaves her queue. So if you have something else for her to do she will throw a tantrum about not being able to get off the towel. I hate sims sometimes.

Jasana_BugBreeder
28th Sep 2007, 7:23 AM
Maybe you could try to add 'Allow intersection?' bhav? It's referenced in OBJf. Something like - if sim's interaction object is me, then return true, else return false'. I don't know much about this function, though :( so if you'll play with it and it'll work, please share the details :)

Inge Jones
28th Sep 2007, 7:44 AM
I know - I have used allow intersection in the past but it just doesn't seem to be working any more. That's what I happily but fruitlessly coded it to do first before coming to this thread. The sims seem to be completely ignoring it now. It may be one of those things which has changed in later EPs. There appears to be a new setting "Allow walkover" but I had similar (non)results using that too.

Echo
29th Sep 2007, 3:10 PM
Just dropping in to add something for future users of this thread - I'm about 99% sure that, since all this stuff is little endian, you have to reverse the hex digits between steps 3 and 4. That is, you go from this:
00 00
FF F0
FF FC
FF FE
FF FE
...

to this:
00 00
F0 FF
FC FF
FE FF
FE FF
...
and then to this:
00 00 F0 FF FC FF FE FF FE FF

Otherwise it comes out all strange when you try to draw out the maxis footprints. :)