Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Test surface object's standing on.
Test surface object's standing on.
2004-11-08, 1:04 PM #1
Hi!
I have this object (table on wheeles) and I wish to test the floor it stands on for special flags. I've flagged some surfaces with unused flags so I can give the sound effect of grated floors. I believe you've had a shopping cart and you've pushed it over a grate where you wipe your shoes before enering the super market. Well, I have a theory on how to get this sound easily, if I could just test the surface flags.

/Edward
Edward's Cognative Hazards
2004-11-08, 2:08 PM #2
Not the touching part... Just the standing (attached to floor)...
Edward's Cognative Hazards
2004-11-09, 8:29 AM #3
Hm... That could be an idea... Only, some rooms have more than one sector in them and the object won't reach all the way down...
Edward's Cognative Hazards
2004-11-09, 9:06 PM #4
Funny...I have worked on this type of detection, and here is the main part of what I have:

Quote:
// Need FireProjectile, so dummyPlayer does not explode on player.
dummyFeet = FireProjectile(player, toucher_tpl, -1, -1, '0 0 0',
'0 0 0', 0, 0, 0, 0);
ClearThingFlags(dummyFeet, 0x80000); // Enable thing.
ClearThingFlags(dummyFeet, 0x400000); // Disable sector thrust.
SetPhysicsFlags(dummyFeet, 0x2); // Enable thing thrust.
// ClearThingFlags(dummyFeet, 0x10); // Show thing.
CaptureThing(dummyFeet);
SetThingModel(dummyFeet, GetThingModel(player));
TeleportThing(dummyFeet, player); // Orient same as player.
SetThingCollideSize(dummyFeet, 0.001);
SetThingMoveSize(dummyFeet, 0.001);
SetThingThrust(dummyFeet, '0 0 -1000'); // Thrust "downwards".


This part is simple; except for it to work, it needs to use a modified version of the 'touched message' code (in the thread to which Arden linked). The way all of this works is a little complicated, and I don't have the time (yet) to post it. Maybe the code snippet above will help until I do post it.

If you email me or reply in this thread with interest in the code, I will make the posting of the code a priority over my other JK projects. ;)

:)

↑ Up to the top!