Hey all!
I'm a long time server host and today the new Targets came out!
When you hit a Bullseye the target falls backwards,
But at that point you have to walk over to them and THEN press reset to raise them again.
I was in my shooting range and I got annoyed by how you have to Reset them Every time!
So my idea is a Plugin that will be like AutoDoor , but you set the time for how long (in secs) till' the target reset's itself!
So the targets can be fully automatic!
This would be amazing if someone could create it! I would be extremely happy!
Cheers!
Bambi.
Solved Auto-reset targets
Discussion in 'Plugin Requests' started by ▼Δ Superbambi Δ▼, Feb 25, 2016.
-
I'd like to see something like this too.
It would be great to also have something that reports and tracks the distance of the shots on the target.Kind of like a target scoreboard.
Last edited by a moderator: Feb 25, 2016 -
Wrong section
I'll take a look tonight and see what I can do
-
-
I will also look into that tonight.
-
I will also be attempting this.
-
Lol anyone else want to jump on the auto reset bandwagon?
-
I'll see what I can do, too. Let's just have a nice target-fest together.
-
After a quick look in assembly here is some code for the others that are making this. although it seems pointless many people making it
Code:void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo hitinfo) { try { if (entity is ReactiveTarget && hitinfo.Initiator is BasePlayer) { var target = (ReactiveTarget)entity; if (target.IsKnockedDown()) timer.Once(5, ()=> target.SetFlag(BaseEntity.Flags.On, true)); } } catch (Exception ex) { } }
-
Haha I just finished too lol!
Code:void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { if(entity is ReactiveTarget) { ReactiveTarget target = (ReactiveTarget)entity; if (target != null) { if (target.IsKnockedDown() == true) { timer.Once(3f, () => { target.SetFlag(BaseEntity.Flags.On, true); }); } } } }
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
-
@Wulf - Since there doesn't seem to be a PM in regards to my post being deleted, I hope you don't remind me replying here... First, to start off with, sorry for apparently breaking a rule by posting the entire plugin in code, but I suspected this was fine given the fact that the 3 of us here were kinda just discussing how we'd all finished, and I didn't exactly think using the entire thing would be against anything. Also, people attach plugins to replies quite often, so I found it weird that this was an exception. And, I found it pointless to actually post mine, as someone else had already done so, but whatever. You could've just edited the post, instead of removing it.
-
Wulf Community Admin
Plugins attached in this forum section are always removed, as they should be going through the plugin submission process if they are going to be public plugins, else they should be sent via PM if they plan on remaining private. -