| Blockland Forums > Suggestions & Requests |
| OnVehicleClicked |
| << < (3/4) > >> |
| SWAT One:
--- Quote from: MARBLE MAN on October 26, 2013, 06:55:43 PM ---TIL i could have made this better: Vehicle::OnActivate(%vehicle, %activatingObj, %activatingClient, %pos, %vec) --- End quote --- Is that the entire script as compared to the last one, or do we have to paste that in somewhere? |
| MARBLE MAN:
--- Quote from: SWAT One on October 28, 2013, 10:21:35 PM ---Is that the entire script as compared to the last one, or do we have to paste that in somewhere? --- End quote --- RegisterInputEvent(fxDtsBrick, "onVehicleClicked", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame"); package clickVehicle { function Vehicle::OnActivate(%obj, %activatingObj, %activatingClient, %pos, %vec) { Parent::OnActivate(%obj, %activatingObj, %activatingClient, %pos, %vec); 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); |
| Subpixel:
--- Quote from: SWAT One on October 28, 2013, 10:21:35 PM ---Is that the entire script as compared to the last one, or do we have to paste that in somewhere? --- End quote --- no, just package this --- Code: ---RegisterInputEvent(fxDtsBrick, "onVehicleClicked", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame"); package onVehicleClicked { function Vehicle::OnActivate(%obj, %activatingObj, %activatingClient, %pos, %vec) { Parent::OnActivate(%obj, %activatingObj, %activatingClient, %pos, %vec); if(isObject(%obj.spawnBrick)) { $InputTarget_["Self"] = %obj.spawnBrick; $InputTarget_["Player"] = %activatingObj; $InputTarget_["Client"] = %activatingClient; $InputTarget_["Minigame"] = %activatingClient.minigame; %obj.spawnbrick.processInputEvent("onVehicleClicked", %activatingClient); } } }; activatePackage(onVehicleClicked); --- End code --- |
| TB2:
Made a few changes to the script and am done packaging, works like a charm! |
| MARBLE MAN:
--- Quote from: TB2 on October 29, 2013, 08:15:03 AM ---Made a few changes to the script and am done packaging, works like a charm! --- End quote --- What would you need to change...? |
| Navigation |
| Message Index |
| Next page |
| Previous page |