Author Topic: Event-Activating Item  (Read 646 times)

     This little idea came to my head after I realized half the things I want to make required some sort of special effect to be applied after a melee 'attack' hit someone. And without having to ask for a new set of stuff meant specifically for teleporting to THAT ONE BLOCK or whatever. So I kind of just sorta maybe possibly combined the idea.

     What I am looking for is a set of 1-3 tools - preferably capping at three or four (amount changeable by rtb prefs or a command or something then resetting the server) which each have their own RTB prefs called 'brick name', for which you set the brick name which the item would align to (they would probably all be very short range, melee-like). Along with this could be three new input events, 'OnItemHitTarget' 'OnItemSuccess' and 'OnItemFailure'. These events would be placed on a brick with the name put in the preferences. When anyone in the server uses this item, these events would activate. 'OnItemHitTarget' will apply the events to the target if possible (if they aren't brick-only events). 'OnItemSuccess' would apply it to the user, and 'OnItemFailure' would apply it to the user, but only if it did not hit anyone.

EXAMPLE:
Item1's brick preferences is set to 'lolme'.
lolme  events:

(0) OnItemHitTarget > Player > SetVelocity (0) (0) (20)
(1000) OnItemHitTarget > Player > SpawnExplosion (Tank Shell)
(1000) OnItemSuccess > Player > AddHealth (100)
(0) OnItemFailure > Player > SpawnExplosion (Player Teleport A)
(33) OnItemFailure > NAMEDBRICK: intothefire > SetPlayerTransform

So, if someone on the server uses the item and it hits, that player will rise up and explode, and in turn get healed. If they use it and don't hit, they'll get teleported into a pit of fire or whatever.
I just believe this could be incredibly useful, and with negative addhealth values, make really simple custom weapons of sorts.

So, uh, thoughts?

I don't see how this would possibly link into players.

Given there are certain items that already work like that, for instance the RPG Item Pack (Pickaxe, axe, fishing rod), it should be easy for anyone to modify the said scripts.

Given there are certain items that already work like that, for instance the RPG Item Pack (Pickaxe, axe, fishing rod), it should be easy for anyone to modify the said scripts.
I can't really tell whether you scanned over this too fast, did not understand what I am trying to say, I'm an idiot, or I don't understand what you are trying to say, although I'm not looking for events triggered when a certain weapon/projectile hits the brick - that I can already do. I mean an event that triggers when someone somewhere in the server uses it, and the events activate based on how the item/weapon/whatnot proceeds to hit, and on who.


I don't see how this would possibly link into players.
What? As in, you don't understand how this could possibly be scripted? I would understand if it is incredibly hard to script this, or even not possible, but it was something I have been wanting to suggest for a few days now, seeing as how useful it could be to those who cannot script well or at all or possibly even too lazy to learn.

I'm sorry, but I'm gonna just bump this. I also notice that 'Event-Activating' can be a bit misleading, so how about we call it 'event-linked' item for now?