If you want to kill someone when they enter an area use triggers.It's a few lines of code :) Nothing hard.
datablock TriggerData(NameOfMyTrigger){ tickPeriodMS = 100; // Don't worry about this};function NameOfMyTrigger::onEnterTrigger(%data, %trig, %obj){ // This is what happens when someone enters your trigger // %trig is the exact trigger that someone entered // %obj is the person / thing that entered the trigger messageClient(%obj.client, '', 'Hi');}function NameOfMyTrigger::onLeaveTrigger(%data, %trig, %obj){ // No need to do anything if they leave the trigger, i guess...}
==> new Trigger(SomeTrigger) { dataBlock = "NameOfMyTrigger"; };==> $myPlayer = ClientGroup.getObject(0).player;==> SomeTrigger.setPosition( $myPlayer.getPosition() );==> SomeTrigger.setScale("5 5 5");
This is how you make a trigger:Code: [Select]datablock TriggerData(NameOfMyTrigger){ tickPeriodMS = 100; // Don't worry about this};function NameOfMyTrigger::onEnterTrigger(%data, %trig, %obj){ // This is what happens when someone enters your trigger // %trig is the exact trigger that someone entered // %obj is the person / thing that entered the trigger messageClient(%obj.client, '', 'Hi');}function NameOfMyTrigger::onLeaveTrigger(%data, %trig, %obj){ // No need to do anything if they leave the trigger, i guess...}Then you just spawn one and set it's size and position.You can use the editor to do that, or do it through the console:Quote==> new Trigger(SomeTrigger) { dataBlock = "NameOfMyTrigger"; };==> $myPlayer = ClientGroup.getObject(0).player;==> SomeTrigger.setPosition( $myPlayer.getPosition() );==> SomeTrigger.setScale("5 5 5");
How helpful of you!