Author Topic: Best way of checking if a player has stopped touching a brick?  (Read 1168 times)

All at does it the moment is send a message to the client, but of course I'd like to make it so you can select an option. The only problem is if a client has touched it, he/she might accidently say a number later and it will still go through.

So, anyone know how to check if they go off the brick?





This is going to be a new CityRPG add-on if you're wondering, hopefully better than Iban's buggy add-on...

Use a radius/box search, or maybe even just a vectorDist, to see if they're within touching range

Ibans CityRPG uses triggers. I forget how they work, but you can look them up. They have onEnter and onLeave functions.

Ibans CityRPG uses triggers. I forget how they work, but you can look them up. They have onEnter and onLeave functions.
Oh yeah, this is an option too
I basically forgot about triggers after events came out

Code: [Select]
datablock triggerData(someTriggerData)
{
tickPeriodMS = 100;
};
function someTriggerData::onEnterTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onLeaveTrigger(%this, %trigger, %obj)
{
//stuff
}
function someTriggerData::onTickTrigger(%this, %trigger, %obj)
{
//stuff
}
new trigger(theActualTrigger)
{
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
datablock = someTriggerData;
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000";
};
if this is what you were looking for, have fun
You don't have to use onTickTrigger and junk.

Guess I'll have to find out about triggers then, I had never even heard of them before. Thanks guys!