Hello. I am currently working on a project, and one part of it includes laser guns.
My main issue is the creation of the laser beam.
To put it simply, I want the laser to be similar to Hypixel's "Cops and Crims"; the laser should suddenly appear and leave a trail of particles.
Because this is a laser gun, the laser must be fast moving. As a result, simple guns shown in videos that use arrows or any projectile which is affected by gravity does not match what I am looking for.
Of course, I would not be posting for help unless I have already tried. My current version, which involves teleporting armorstands at 1 block increments, is far too slow. I have seen people use Elytras, but those only work horizontally and are affected by gravity.
Edit: (After posting a reply, I thought that it would be helpful for other people if I copied some key points in the reply here)
I believe my problem can be divided into a few issues:
- Projectile Motion
The "laser" must be moving at high speeds.
- System Accuracy
The "laser" must travel in a straight line. The laser should also not have awkward behavior with walls (the laser should disappear upon contact with the wall). Awkward behavior includes going inside the wall, getting stuck in a wall, and climbing up walls (that actually happened when I was testing with the motion datatag....).
- Varied Usage
The system must be multiplayer friendly and not induce large amounts of lag. Furthermore, though not mandatory, the laser should be applicable to other entities besides the player.
In another thread there's someone who made armorstands making a line where you're looking at. So you could just watch that video and change some few things. I'll send you it if you're interested.
So there the blocks got changed but what you want is to shoot something so you could create a line of armorstands where the players is looking and when you press right click that I explained that in another thread (Look at it here) if the armorstand detect a player in a radius of 1 block then the player loses health with an effect or something. I hope it worked. If you need more help tell me.
The command module does not have to be in 1.8, 1.9 snapshots also work.
I'm afraid that your video did not fit the situation well. The /setblock command works on a grid with specific coordinates based on player location. However, because I am trying to raycast, there are no specific coordinates for the target.
I believe my problem can be divided into a few issues:
- Projectile Motion
The "laser" must be moving at high speeds.
- System Accuracy
The "laser" must travel in a straight line. The laser should also not have awkward behavior with walls (the laser should disappear upon contact with the wall). Awkward behavior includes going inside the wall, getting stuck in a wall, and climbing up walls (that actually happened when I was testing with the motion datatag....).
- Varied Usage
The system must be multiplayer friendly and not induce large amounts of lag. Furthermore, though not mandatory, the laser should be applicable to other entities besides the player.
I have already created the "Casting" system to summon the laser, but I am not sure how to do the laser itself.
The command module does not have to be in 1.8, 1.9 snapshots also work.
I'm afraid that your video did not fit the situation well. The /setblock command works on a grid with specific coordinates based on player location. However, because I am trying to raycast, there are no specific coordinates for the target.
I believe my problem can be divided into a few issues:
- Projectile Motion
The "laser" must be moving at high speeds.
- System Accuracy
The "laser" must travel in a straight line. The laser should also not have awkward behavior with walls (the laser should disappear upon contact with the wall). Awkward behavior includes going inside the wall, getting stuck in a wall, and climbing up walls (that actually happened when I was testing with the motion datatag....).
- Varied Usage
The system must be multiplayer friendly and not induce large amounts of lag. Furthermore, though not mandatory, the laser should be applicable to other entities besides the player.
I have already created the "Casting" system to summon the laser, but I am not sure how to do the laser itself.
Please respond soon ;-;
But what you want is a laser gun. Right?
So make a laser mechanism instead of a setblock. The video was just to explain how did it work but you can do whatever you want when the command detect the direction.
Ans: (Which will never meet your satisfaction)
- Projectile Motion
just set the Motion tag into a high number eg: Motion:[100.0,100.0,100.0]
-System Accuracy
With such a high Motion, it should be straight lines. With arrows...
-Varied Usage
With Scoreboard Mechanics, it's usually multiplayer friendly
Your first statement is true, but for a different reason. Setting the Motion tag to a high number causes the armorstand to be affected by gravity in the beginning and the end. Furthermore, setting the y-value motion above 0 causes the armorstand to climb up walls that it runs into. This can be fixed by killing the armorstand when a wall is detected nearby, but this causes even more problems (i.e. shooting next to walls in corridors).
I completely intend to use scoreboard mechanics. The question is, [b]how do a create a projectile which utilizes those scoreboards?[/b]
Thanks for replying though!
I'm assuming "Cops and Crims" is a server minigame. I can say with fairly high confidence that you won't[/b] be able to replicate what that server has done by 100%. There are a few reasons and these factors are the properties that you've stated that you want the laser to have. Sure, there's multiple ways to do this, but none will fit your description. Too many factors and our options are restricted to not fullfilling all of them.
Rotation/facing[/b]
This is one of the more accurate ways of doing it, although there's no way to apply it without typing exact rotation, resulting in very many precise command blocks.
PROS:
1. Accurate
2. Customizable motion
CONS:
1. Very command block heavy. Atleast 180*360 blocks if you want it to cover all angles.
2. A result of #1, high levels of lag and blocks updates.
You're right, I will never 100% copy the server plugin. However, I've seen other people manage to do exactly what I'm looking for (WubbiConcept's laservision, for example).
As for the methods you listed, I have already chosen NOT to use Elytras, as this system must work vertically as well as horizontally.
The main issue with the raycasting system now is "How can I teleport the armorstand at high speeds while paying attention to collisions?" Attempting to teleport the armorstand more than 1 block causes it to have a chance of going through walls/entities.
So make a laser mechanism instead of a setblock. The video was just to explain how did it work but you can do whatever you want when the command detect the direction.
That's what I'm asking for help about, making a laser mechanism.
Your video displayed 2 main command block commands:
- testfor rotation
- /setblock at relative coordinates.
This is not helpful, because I am looking for a way to cause strong motion to an armorstand while it remains accurate. Your command module used relative /setblock coordinates, which is not applicable in raycasting as the projectile follows a vector.
Oh yeah, I forgot it. To make it multiplayer create a scoreboard to name the players.
.______.
Even if a scoreboard were to be created in your video, you would still need to create as many modules as there are players.
I don't know if this helps, but I saw a video where people had an invisible guardian riding an invisible squid constantly being teleported to them, and somehow they made it where the guardian would only shoot if you were holding a specific item. If your squid died, than you would be killed.
Well, that video is very complicated. I'm not sure if it's multiplayer friendly either. But if you're willing to go that far for a laser you might need to download the map and take a look at it yourself (so you understand what you're doing). Best of luck.
If you are referring to Wubbi's video, I have already tried to download the map and study it. However, the command blocks are scattered and some functions broken (because Wubbi most likely had to disable/break certain command blocks that would interfere with the final demonstration of the Portal Gun).
It isn't too complicated, as it is divided in multiple sections and is easy to understand the general concept, but I'm trying to get the key points of it (such as how the armorstands can move so quickly).
Thanks for wishing me luck. It's appreciated
I don't know if this helps, but I saw a video where people had an invisible guardian riding an invisible squid constantly being teleported to them, and somehow they made it where the guardian would only shoot if you were holding a specific item. If your squid died, than you would be killed.
That sounds very interesting! I may look into that, but I can foresee a few problems with the system, including targeting and controlling Guardian AI. The firing will most likely be slow, but I can imagine how it might work for "Spaceships", rather than laser guns.
Yes, Dragnoz did indeed make a "Dogfight" system with Guardians and Bats. However, I cannot use that as the results from that system do not match up to my intended results (a laser that appears in a sudden line of particles).
I am still looking for help. If you have any ideas on how to increase the teleportation speed of armorstands or anything on raycasting, it would be extremely helpful.
As stated in the original post, this would cause the armorstand to lose accuracy in collision checks. Thus, increasing the teleportation distance above .94 is not an option.
.
Use /entitydata for it then, no more /tp for him, just a plain old
/entitydata @e[type=ArmorStand,tag=???] {NoGravity:1,Motion:[???]}
This was one of the first things I tried.
Unfortunately, the Motion tag results in extremely awkward behavior with walls. If the Y value is specified to be greater than 0, the armorstand will climb up walls. If the ArmorStand is summoned with the Motion tag, it will decelerate over time.
Thus, the Motion tag is not an option.
I have succeeded in increasing the teleportation speed by a small amount!
It is done by summoning a new armorstand near the previous one, then killing the other. All of this happens while the armorstands are being teleported, resulting in a slightly higher speed. However, it is still not fast enough. I hope that sharing this result sparks some new ideas.
Hello. I am currently working on a project, and one part of it includes laser guns.
My main issue is the creation of the laser beam.
To put it simply, I want the laser to be similar to Hypixel's "Cops and Crims"; the laser should suddenly appear and leave a trail of particles.
Because this is a laser gun, the laser must be fast moving. As a result, simple guns shown in videos that use arrows or any projectile which is affected by gravity does not match what I am looking for.
Of course, I would not be posting for help unless I have already tried. My current version, which involves teleporting armorstands at 1 block increments, is far too slow. I have seen people use Elytras, but those only work horizontally and are affected by gravity.
Edit: (After posting a reply, I thought that it would be helpful for other people if I copied some key points in the reply here)
I believe my problem can be divided into a few issues:
- Projectile Motion
The "laser" must be moving at high speeds.
- System Accuracy
The "laser" must travel in a straight line. The laser should also not have awkward behavior with walls (the laser should disappear upon contact with the wall). Awkward behavior includes going inside the wall, getting stuck in a wall, and climbing up walls (that actually happened when I was testing with the motion datatag....).
- Varied Usage
The system must be multiplayer friendly and not induce large amounts of lag. Furthermore, though not mandatory, the laser should be applicable to other entities besides the player.
Please help by posting ideas. Thanks in advance.
Hello. I am a noob. Help please? Thanks.
In another thread there's someone who made armorstands making a line where you're looking at. So you could just watch that video and change some few things. I'll send you it if you're interested.
I am very interested in anything that could provide information or reference. If you could link me the video, it would be greatly appreciated.
*whisper* I'm pretty desperate for help ahaha......
Hello. I am a noob. Help please? Thanks.
Oh, and I forgot it. It's on 1.9 I'll send you the video in a few minutes.
Ok, I found one for 1.8 but it's complex. But I know it will be very useful. Watch it! .
And I hope it work. If you need more help tell me.
So there the blocks got changed but what you want is to shoot something so you could create a line of armorstands where the players is looking and when you press right click that I explained that in another thread (Look at it here) if the armorstand detect a player in a radius of 1 block then the player loses health with an effect or something. I hope it worked. If you need more help tell me.
The command module does not have to be in 1.8, 1.9 snapshots also work.
I'm afraid that your video did not fit the situation well. The /setblock command works on a grid with specific coordinates based on player location. However, because I am trying to raycast, there are no specific coordinates for the target.
I believe my problem can be divided into a few issues:
- Projectile Motion
The "laser" must be moving at high speeds.
- System Accuracy
The "laser" must travel in a straight line. The laser should also not have awkward behavior with walls (the laser should disappear upon contact with the wall). Awkward behavior includes going inside the wall, getting stuck in a wall, and climbing up walls (that actually happened when I was testing with the motion datatag....).
- Varied Usage
The system must be multiplayer friendly and not induce large amounts of lag. Furthermore, though not mandatory, the laser should be applicable to other entities besides the player.
I have already created the "Casting" system to summon the laser, but I am not sure how to do the laser itself.
Please respond soon ;-;
Hello. I am a noob. Help please? Thanks.
Ans: (Which will never meet your satisfaction)
- Projectile Motion
just set the Motion tag into a high number eg: Motion:[100.0,100.0,100.0]
-System Accuracy
With such a high Motion, it should be straight lines. With arrows...
-Varied Usage
With Scoreboard Mechanics, it's usually multiplayer friendly
I don't think my answer will help, but sure, 1+1=2, right?
But what you want is a laser gun. Right?
So make a laser mechanism instead of a setblock. The video was just to explain how did it work but you can do whatever you want when the command detect the direction.
Oh yeah, I forgot it. To make it multiplayer create a scoreboard to name the players.
Your first statement is true, but for a different reason. Setting the Motion tag to a high number causes the armorstand to be affected by gravity in the beginning and the end. Furthermore, setting the y-value motion above 0 causes the armorstand to climb up walls that it runs into. This can be fixed by killing the armorstand when a wall is detected nearby, but this causes even more problems (i.e. shooting next to walls in corridors).
I completely intend to use scoreboard mechanics. The question is, [b]how do a create a projectile which utilizes those scoreboards?[/b]
Thanks for replying though!
You're right, I will never 100% copy the server plugin. However, I've seen other people manage to do exactly what I'm looking for (WubbiConcept's laservision, for example).
As for the methods you listed, I have already chosen NOT to use Elytras, as this system must work vertically as well as horizontally.
The main issue with the raycasting system now is "How can I teleport the armorstand at high speeds while paying attention to collisions?" Attempting to teleport the armorstand more than 1 block causes it to have a chance of going through walls/entities.
That's what I'm asking for help about, making a laser mechanism.
Your video displayed 2 main command block commands:
- testfor rotation
- /setblock at relative coordinates.
This is not helpful, because I am looking for a way to cause strong motion to an armorstand while it remains accurate. Your command module used relative /setblock coordinates, which is not applicable in raycasting as the projectile follows a vector.
.______.
Even if a scoreboard were to be created in your video, you would still need to create as many modules as there are players.
Hello. I am a noob. Help please? Thanks.
I don't know if this helps, but I saw a video where people had an invisible guardian riding an invisible squid constantly being teleported to them, and somehow they made it where the guardian would only shoot if you were holding a specific item. If your squid died, than you would be killed.
If you are referring to Wubbi's video, I have already tried to download the map and study it. However, the command blocks are scattered and some functions broken (because Wubbi most likely had to disable/break certain command blocks that would interfere with the final demonstration of the Portal Gun).
It isn't too complicated, as it is divided in multiple sections and is easy to understand the general concept, but I'm trying to get the key points of it (such as how the armorstands can move so quickly).
Thanks for wishing me luck. It's appreciated
That sounds very interesting! I may look into that, but I can foresee a few problems with the system, including targeting and controlling Guardian AI. The firing will most likely be slow, but I can imagine how it might work for "Spaceships", rather than laser guns.
Hello. I am a noob. Help please? Thanks.
That's dragnoz, huh.
Yah, now that I think about it, I think it was. But it isn't copying if you make it better!
Yes, Dragnoz did indeed make a "Dogfight" system with Guardians and Bats. However, I cannot use that as the results from that system do not match up to my intended results (a laser that appears in a sudden line of particles).
I am still looking for help. If you have any ideas on how to increase the teleportation speed of armorstands or anything on raycasting, it would be extremely helpful.
Hello. I am a noob. Help please? Thanks.
I wish there's a raycasting system in minecraft..
btw, just increate the teleportation distance...
As stated in the original post, this would cause the armorstand to lose accuracy in collision checks. Thus, increasing the teleportation distance above .94 is not an option.
Hello. I am a noob. Help please? Thanks.
Use /entitydata for it then, no more /tp for him, just a plain old
/entitydata @e[type=ArmorStand,tag=???] {NoGravity:1,Motion:[???]}
This was one of the first things I tried.
Unfortunately, the Motion tag results in extremely awkward behavior with walls. If the Y value is specified to be greater than 0, the armorstand will climb up walls. If the ArmorStand is summoned with the Motion tag, it will decelerate over time.
Thus, the Motion tag is not an option.
I have succeeded in increasing the teleportation speed by a small amount!
It is done by summoning a new armorstand near the previous one, then killing the other. All of this happens while the armorstands are being teleported, resulting in a slightly higher speed. However, it is still not fast enough. I hope that sharing this result sparks some new ideas.
Hello. I am a noob. Help please? Thanks.