I've done everything to the letter in the main post. But I am still getting a "Implicit cast not allowed" error on the "lv_closestUnit != gv_mainUnit " line. I cannot figure it out and, if I keep the line, cannot save the file. I'll remove the line for now, but I'm going to need to fix this and I don't know how. Again, I've followed everything to the letter yet I continue to get this error. I've also re-done this in a new testing-only map and it still doesn't work (because of this error, I cannot save it and show you the error). I've kept all the original names in this second map.
That error tells me your Closest Unit and Main Unit variables are not both Unit variables.
Hi, Im trying to use parts of this system, but I rather want a somewhat 'top-down' perspective but still rotating with the mouse - and just shooting in the direction of the camera, but not height relative.
Im kind of lost, anyone has any ideas on how to achieve this?
Hey guys. I am making a third person shooter and the line lv_closestUnit != gv_mainUnit doesn't work! I have tried and tried and tried. It keeps giving me errors even thought I looked over the tutural like 10 times! PLEASE HELP.
I'm making a hero arena and want to use tracelines to target the other players. Similar to smashcraft. I want the unit to be where the line starts from and the point clicked to be where the line ends. So it could be more than 50 units or less. How would I deal with this?
In a recurring function (Every 0.0 seconds, etc). This is useful if you want to use the current target information to display info to the player about the unit they're looking at. You can see an example of this in my Reaper Madness videos. You can then use the SAME information (You don't have to run the traceline twice) to determine which unit or piece of terrain to shoot when the player hits the attack key (such as left mouse click).
Could you go more into this? I would like to just create a dialog item that displays the health (bar and percentage) of the traceline_currentTarget.
One other question if it is possible to do head shots? Maybe figure the height of each enemy mob and do an If Than Else* action to check to see what the traceline_currentTargetHeight is if it is between the specific "head" area. Is there any way to check to do a data reference on the "head" attachment origin of the traceline_currentTargetUnit through the Attachment Methods tab of the Data Editor.
Next we'll want to start in on our code. As explained earlier, we will be checking each point in small intervals in a loop. So, we need to set up the loop. Create a variable named "Trace Distance" (real) and set its initial value to 0.0. This variable will keep track of how far along the imaginary line we are. Now we'll set up our loop:
while(lv_traceDistance < 50.0) { While Trace Distance is under our max range, 50, we want to run everything between the squiggly brackets: {}
This is where all of our future code is going to go.
lv_traceDistance += 0.5; At the end of the loop we increment our distance from the camera by 0.5 units. Since the maximum distance is 50.0, this loop will run up to 100 times.
}
i dont understand what to do wit this what is it
while(lv_traceDistance < 50.0) { While Trace Distance is under our max range, 50, we want to run everything between the squiggly brackets: {}
This is where all of our future code is going to go.
lv_traceDistance += 0.5; At the end of the loop we increment our distance from the camera by 0.5 units. Since the maximum distance is 50.0, this loop will run up to 100 times.
}
I've made an account just to reply to this post. I've copied the traceline function EXACTLY and despite changing the team that can be attacked from "15" to "c_playerAny" it always tells me I have one error that prevents me from saving or testing it, which is the following:
"Expected a boolean expression"
And of course its on the line of
"lv_closestUnit != gv_mainUnit &&"
(And no, in the code I don't have quotes around any of those things quoted)
I'd appreciate any help, thankyou in advance. I've been trying to get this crap (good crap though ) to work for hours on end (No joke)
That error tells me your Closest Unit and Main Unit variables are not both Unit variables.
@rrowland: Go
Hi, Im trying to use parts of this system, but I rather want a somewhat 'top-down' perspective but still rotating with the mouse - and just shooting in the direction of the camera, but not height relative. Im kind of lost, anyone has any ideas on how to achieve this?
is the reason the maps wont save is because the line
lv_closestUnit != gv_mainUnit
doesnt account for the fact that the mainUnit is an array for most people? therefore the line should read:
lv_closestUnit != gv_mainUnit[lp_player]
Please update your script to identify that by using an array<sub> the array number must also be identified</sub>
Hey guys. I am making a third person shooter and the line lv_closestUnit != gv_mainUnit doesn't work! I have tried and tried and tried. It keeps giving me errors even thought I looked over the tutural like 10 times! PLEASE HELP.
I'm making a hero arena and want to use tracelines to target the other players. Similar to smashcraft. I want the unit to be where the line starts from and the point clicked to be where the line ends. So it could be more than 50 units or less. How would I deal with this?
I seem to be having a problem with this;
All of the lines that read [lp_player] give me the error that '[' cannot be used in the array.
FIXED
@rrowland: Go
Could you go more into this? I would like to just create a dialog item that displays the health (bar and percentage) of the traceline_currentTarget.
One other question if it is possible to do head shots? Maybe figure the height of each enemy mob and do an If Than Else* action to check to see what the traceline_currentTargetHeight is if it is between the specific "head" area. Is there any way to check to do a data reference on the "head" attachment origin of the traceline_currentTargetUnit through the Attachment Methods tab of the Data Editor.
@rrowland: Go
hi if someone can helpi that will be apreciated
i dont understand this part
Next we'll want to start in on our code. As explained earlier, we will be checking each point in small intervals in a loop. So, we need to set up the loop. Create a variable named "Trace Distance" (real) and set its initial value to 0.0. This variable will keep track of how far along the imaginary line we are. Now we'll set up our loop:
while(lv_traceDistance < 50.0) { While Trace Distance is under our max range, 50, we want to run everything between the squiggly brackets: {} This is where all of our future code is going to go. lv_traceDistance += 0.5; At the end of the loop we increment our distance from the camera by 0.5 units. Since the maximum distance is 50.0, this loop will run up to 100 times. }
i dont understand what to do wit this what is it while(lv_traceDistance < 50.0) { While Trace Distance is under our max range, 50, we want to run everything between the squiggly brackets: {} This is where all of our future code is going to go. lv_traceDistance += 0.5; At the end of the loop we increment our distance from the camera by 0.5 units. Since the maximum distance is 50.0, this loop will run up to 100 times. }
sorry for bad english
I've made an account just to reply to this post. I've copied the traceline function EXACTLY and despite changing the team that can be attacked from "15" to "c_playerAny" it always tells me I have one error that prevents me from saving or testing it, which is the following:
"Expected a boolean expression"
And of course its on the line of
"lv_closestUnit != gv_mainUnit &&"
(And no, in the code I don't have quotes around any of those things quoted)
I'd appreciate any help, thankyou in advance. I've been trying to get this crap (good crap though ) to work for hours on end (No joke)
not working at all, probably this way got too old.