How do I do this? There’s no limit on the range, basically whenever the ray cast collides with something it creates an effect, please D:
I do not understand what you mean, if you mean create an effect on where you are looking then it’s not eye position. eye position is where your screen is, it will be used for abilities that shoot. it is where the projectile should start.
To create something on where you are looking, there is a problem, where do you want it exactly? do you want right in front of you or where your cursor is?
The best way to do it is by using a ray cast hit position. Starting from eye position and ending at (eye posistion+facing direction*the distance you want in meters) while ignoring every player or object, you can also use the “nearest walkable position” command with it so it creates on the ground for example.
rule("Set player variable O eye position, stop by pressing right clic")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Ultimate) == True;
}
actions
{
Set Player Variable(Event Player, O, Nearest Walkable Position(Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(
Event Player), Multiply(Facing Direction Of(Event Player), 25)), Empty Array, Empty Array, False)));
Wait(0.016, Ignore Condition);
Skip If(Is Button Held(Event Player, Secondary Fire), 1);
Loop;
Set Player Variable(Event Player, O, Null);
}
}
rule("Create effect on O")
{
event
{
Ongoing - Each Player;
All;
All;
}
actions
{
Create Effect(All Players(All Teams), Light Shaft, White, Player Variable(Event Player, O), 3, Visible To Position and Radius);
}
}
Or HH4G1
Feel free to ask anything!