Author Topic: $TypeMasks And Collision Checks  (Read 1100 times)

What is the type mask for a Tire? And How could I find out future typemasks?
« Last Edit: May 04, 2009, 07:33:34 PM by AGlass0fMilk »

How could I check if a collision was with a tire? Also, I have a problem with my Land mine add on. I am trying to make it so when you place a land mine on top of another land mine, it doesn't explode. Here is the if statement before making it explode:
Code: [Select]
if(%col.getType() & $TypeMasks::VehicleObjectType && $IsColAMine !$= "LandmineCol"
And here is what $IsColAMine is;
Code: [Select]
$IsColAMine = %col.getDatablock().getName();
Now if you type: talk(mineobjectID.getDatablock().getname()); the console repeats in the chat LandmineCol. So I don't know why this doesn't work, it makes it so if the collision object is a vehicle at all, it wont explode. What is wrong with it?
« Last Edit: May 04, 2009, 07:33:52 PM by AGlass0fMilk »

How could I find out future typemasks?

export("$TypeMask*","config/Typemasks.txt",0);
This will export all TypeMasks and their values to the file Typemasks.txt in the config folder.

Well, can you answer my second question?

I'm not sure about that.

Whats a vehicleBlockerObjectType?

I got the vehicle / mine check done, it explodes on vehicle touch, but not mines touch. I just need to know how to make tires make it explode, what TypeMask are they in? If at all?

I would guess that it's $typeMasks::(whatever the tire's classname is)objectType. Not sure off the top of my head though.
Tyres are not physical objects, they're just rendered. They don't have collision callbacks.
Goes with this too. Theres no $TypeMask if it's not an object.
« Last Edit: May 09, 2009, 04:05:27 PM by Slicksilver555 »

I got the vehicle / mine check done, it explodes on vehicle touch, but not mines touch. I just need to know how to make tires make it explode, what TypeMask are they in? If at all?

I explained this to you. Stop being so ignorant - phrasing the question differently will not conjure up a magical solution for you.

This post is old Ephi, I made this before the Tire thing. Sorry, I forgot to lock it.