Blockland Forums > Suggestions & Requests
OnBot"Sword"Hit - Input for hitting a bot with a weapon
Jerkface:
Input event for hitting a bot with a tool.
Like the brick input events for hitting bricks with a pickaxe of a chisel... I want the same activations for AI.
Whoever can do this, and will do this, contact me through PM.
Goth77:
Well. You could use VCE and the onItemPickup events, along with bot events. Might go sumthin like this:
SWORD BRICK EVENTS
onItemPickup - PlayerVCEMOD Var "GOTSWORD" set 1
BOT BRICK EVENTS
onBotDamaged - Player VCE IfVAR "GOTSWORD" = 1
onVarTrue - Client - ChatMsg - "U hit me with a sword, ouch!"
Just note that if you use any other weapon and hit them while still having the GOTSWORD var it will giv the same chat message. This is basically a work around seeing as how the events you are requesting do not exist.
You might be able to make it work better if you have the ifIteminHand or ifIteminInventory events. With those 2 events you could make it
onBotDamaged - Self/Player - IfItemInHand - Sword (i dont remember if its on player or on self)
onVarTrue - Client - Chat Msg - "U hit me with a sword, ouch!"
Hope this helps! PM me if you need further eventing assistance.
Jerkface:
Very helpful, but I'm trying to make a pack of custom items.
I still need the add-on scripted, regardless of workarounds.
Demian:
Modify this to work with AIPlayer objects so you don't have a dozen onBot*Hit events: http://forum.returntoblockland.com/dlm/viewFile.php?id=612
Jerkface:
--- Quote from: Demian on January 25, 2013, 03:40:27 AM ---Modify this to work with AIPlayer objects so you don't have a dozen onBot*Hit events: http://forum.returntoblockland.com/dlm/viewFile.php?id=612
--- End quote ---
I'm using the old Variable events so this does not work for me.
Remember: Criticizing the events that I choose to use is not a solution.