Blockland Forums > Suggestions & Requests
OnVehicleClicked
SWAT One:
onVehicleClicked >> Player >> Kill
onVehicleClicked >> Client >> CenterPrint >> "<color:FF0000><font:Impact:50>DON'T TOUCH MY loving CAR YOU stuff!!!"
TB2:
--- Quote from: SWAT One on October 29, 2013, 02:03:24 PM ---onVehicleClicked >> Player >> Kill
onVehicleClicked >> Client >> CenterPrint >> "<color:FF0000><font:Impact:50>DON'T TOUCH MY loving CAR YOU stuff!!!"
--- End quote ---
The best alternative to a bait car.
--- Quote from: MARBLE MAN on October 29, 2013, 08:58:15 AM ---What would you need to change...?
--- End quote ---
Okay, I am going to tell everyone right now, I suck at wording things. What I meant was:
"I had to change namecheck because it would not work, turns out I left out a capital."
Subpixel:
--- Quote from: MARBLE MAN on October 28, 2013, 10:25:09 PM ---
RegisterInputEvent(fxDtsBrick, "onVehicleClicked", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
package clickVehicle
{
function Vehicle::OnActivate(%vehicle, %activatingObj, %activatingClient, %pos, %vec)
{
Parent::OnActivate(%vehicle, %activatingObj, %activatingClient, %pos, %vec);
Vehicle::onClick(%obj,%activatingObj,%activatingClient)
if(!isObject(%obj.spawnBrick))
return;
$InputTarget_["Self"] = %obj.spawnBrick;
$InputTarget_["Player"] = %activatingObj;
$InputTarget_["Client"] = %activatingClient;
$InputTarget_["Minigame"] = getMinigameFromObject(%activatingObj);
%obj.spawnbrick.processInputEvent("onVehicleClicked", %activatingClient);
}
};
activatepackage(clickVehicle);
--- End quote ---
You're an amazing coder, but when you don't test stuff you're really prone to silly mistakes. Vehicle::onClick(%obj,%activatingObj,%activatingClient) doesn't have a trailing semicolon, and %obj doesn't exist.
MARBLE MAN:
--- Quote from: Subpixel on October 29, 2013, 06:48:29 PM ---You're an amazing coder, but when you don't test stuff you're really prone to silly mistakes. Vehicle::onClick(%obj,%activatingObj,%activatingClient) doesn't have a trailing semicolon, and %obj doesn't exist.
--- End quote ---
fixed, Vehicle::onClick doesn't even exist...