| Blockland Forums > Modification Help |
| Changing datablocks |
| (1/1) |
| Firewake:
Hey can any one help me with changing a datablock from standard player to a vehicle on right click? i need it for a couple of vehicles I'm making so if you could show me what to do so i can make 3 different scripts for 3 different vehicle mods, that would help a lot! Thanks to anyone! P.S. this will be a player type add-on |
| Deathwishez:
This will have so many problems with it, I don't know where to begin. |
| takato14:
The concept is simple, and I could make a code. However, using vehicles in that way isnt exactly efficient, or even wise. It could be very abusable and the system would likely be quite unstable. |
| Nexus:
--- Quote ---package schmer //package to overwrite functions { function Armor::onTrigger(%data, %player, %action, %x) { if(%action == 4) //if the player is right clicking %player.setDataBlock(%x?PlayerVehicleArmor:PlayerStandardArmor); //%x is whether the player is pressing the button or releasing it. If %x is true, then it will return PlayerVehicleArmor, otherwise it will return PlayerStandardArmor. parent::onTrigger(%data, %player, %action, %x); //continue on with the funciton } }; activatepackage(schmer); --- End quote --- |
| Navigation |
| Message Index |