Author Topic: How do firerelay up/down/north/south/east/west work?  (Read 640 times)

It would be very helpful to me to know how they work.  For a mod I need things to spread from one brick to another, and I want to stay away from container searches for the fact that a round area doesn't work too well for a rectangular object....

or if there is a better way then how firerelay works, that'd be great too.


and all trace gives me is fire relay up from box, but I don't want it to fire relay...
« Last Edit: August 28, 2008, 12:28:01 PM by laremere »

It probably uses engine code rather than scripts you can access.

A box container search does exist but it can be laggy if you repeat it many times in one 'step'. (e.g. functions that call each other without delays)

A box search would work great, and I'll just have to make sure it isn't called all at once. (was planing on not having it done that way anyways)  Since resources of torque script are somewhat limited if you don't own it, would mind giving me a small piece of code showing how it works?

Code: [Select]
initContainerBoxSearch(%position, %boxSize, %mask);
while (%searchObj= containerSearchNext())
{
   //do stuff to %searchObj
}

Position = center of box
Box size = vector of XYZ lengths of box
Mask is a set of type masks like radius search e.g. ($TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType) gets Players, AIPlayers and all sorts of vehicle in the box. $TypeMasks::fxBrickObjectType is fxDTSBricks.


Uh, just do a search for all the bricks connected to the top of the brick you're using.

I want to do a search in all directions, not just the top, space guy's example will work fine.