Blockland Forums > Modification Help
When A Player Steps Off A Brick
jes00:
How can I detect when a player is no longer in contact with a brick?
Port:
Either use zones or a schedule which is cancelled and rescheduled every time you touch a brick.
jes00:
--- Quote from: Port on June 04, 2012, 09:20:45 AM ---Either use zones or a schedule which is cancelled and rescheduled every time you touch a brick.
--- End quote ---
This is coding help, not eventing.
--- Quote from: Port on June 04, 2012, 09:20:45 AM ---or a schedule which is cancelled and rescheduled every time you touch a brick.
--- End quote ---
Explain please.
Port:
--- Quote from: jes00 on June 04, 2012, 09:42:18 AM ---This is coding help, not eventing.
--- End quote ---
Zones are not events.
--- Quote from: jes00 on June 04, 2012, 09:42:18 AM ---Explain please.
--- End quote ---
function fxDTSBrick::stopTouch( %this, %pl )
{
// do something
}
When %pl (player) touches %obj (brick):
[*] cancel( %obj.stopTouch[ %pl ] );
[*] %obj.stopTouch[ %pl ] = %obj.schedule( tolerance, "stopTouch", %pl );
jes00:
--- Quote from: Port on June 04, 2012, 09:45:01 AM ---Zones are not events.
--- End quote ---
Care to explain?