It was too... Sorry, late night post and clearly my brain wasn't processing what has already been covered :p
I must be missing something in the editor... I can't seem to find any math function for the difference between two given points for the Dot Function and the Subtract Point Function.
lol your code is like the proverbial rabbit hole... That code links to another Function; Point In Triangle. :D
Options:FunctionReturnType:BooleanParameters=NoPoint<Point>=NoPoint<Point>=NoPoint<Point>=NoPoint<Point>GrammarText:(,,,)HintText:(None)CustomScriptCodeLocalVariables=0<Integer>=0<Integer>=NoPoint<Point[2]>
= 0.0 <Real[1][2]>
= 0.0 <Real>
= 0.0 <Real>
= 0.0 <Real>
Actions
Variable - Set (No Value)[0] = ((, ))
Variable - Set (No Value)[1] = ((, ))
Variable - Set (No Value)[2] = ((, ))
General - For each integer (No Value) from 0 to 1 with increment 1, do (Actions)
Actions
General - For each integer (No Value) from 0 to 2 with increment 1, do (Actions)
Actions
Variable - Set (No Value)[(NoValue)][(NoValue)] = ((, ))
Variable - Set (No Value) = (((No Value)[0][0] * (No Value)[1][1]) - ((No Value)[0][1] * (No Value)[0][1]))
Variable - Set (No Value) = (lv_dot[1][1] * lv_dot[0][2] - lv_dot[0][1] * lv_dot[1][2]) / lv_d
Variable - Set (No Value) = (lv_dot[0][0] * lv_dot[1][2] - lv_dot[0][1] * lv_dot[0][2]) / lv_d
General - Return (lv_x >= 0) && (lv_y >= 0) && (lv_x + lv_y <= 1)
This part of the code doesn't make sense to me and since your Trigger properties are all messed up on my side, would you be able to recopy and paste please?
Also, your Function DamageUnit, I can't seem to find it either.
Is there a way I can make these regions visible so I can tell if the code is triggering or not?
.: EDIT :.
Oh I just noticed in your custom script you also have a Function called "AvgPoints", this eludes me also.
I have no idea why all your code is broken on my side :S
I'm not understanding this part of the code...
Also, the editor keeps erroring on your custom script too.
.: EDIT :.
I have noticed in your Triggers that you have a Function that looks to be for the way to create a rectangle region between the turrets.
However it looks messed up on my side for some reason...
Grrr... I have duplicated that effect verbatim and recreated the Beam ability from your map.
It will not work for me... The beam ability doesn't trigger from what I can tell.
I gave the ability to a structure and I am targeting a structure.
I thought maybe it was because it needed to target a Unit, so I changed those parameters to structures and nothing :(
Also, I can't choose the Beam ability in the script... Maybe because it doesn't have a sub command???
.: EDIT :.
Then
DamageUnit((Picked unit), (Triggering unit), damage)
Else
Could I however make the Tower fire arc of 360deg, then when a unit comes in its range, it then does the trigger to see if the unit is crossing its beam?
Awesome stuff! Cheers for the reply... I will definitely have to have a play with that and see what I can come up with.
My only concern is that you mention a region trigger... This really wouldn't work if the tower placement wasn't fixed.
IE if the player places a tower, how would there be a region trigger? Or can you add those with tower placement?
I've had a search around the forums and haven't quite found what I am after.
I am creating a TD map and there is an ability that I want to make but for the life of me, can't figure it out.
Basically I want a Tower to emit a beam to another Tower, then any mob that passes through that beam, gets dealt X damage.
Kind of like a laser fence, but spans between the chosen towers.
I had found some threads in regards to linking a slave unit to a master which would be good to determine host Tower to receiving tower.
But I don't know how to make this variable beam deal damage to anything that crosses it.
.: EDIT :.
Just had a thought about connecting the towers.
Is there a way to make a Tower auto connect and beam to another Tower of the same type WITHIN its range.
So if you had 3 in the range of each other, all would have beams shooting to them?
0
@SBeier: Go
It was too... Sorry, late night post and clearly my brain wasn't processing what has already been covered :p
I must be missing something in the editor... I can't seem to find any math function for the difference between two given points for the Dot Function and the Subtract Point Function.
0
@SBeier: Go
lol your code is like the proverbial rabbit hole... That code links to another Function; Point In Triangle. :D
Would it be that one?
0
Ok, so I have almost everything in and I am guessing the part that I have missing is the part that prevents it from applying damage.
Which comes back to Point In Square... Which I assume is also a Function that you call, the only thing close that I can find in your map is;
Is that it?
0
@SBeier: Go
Awesome :) Sorry I hadn't got back on sooner, have been sick the past couple days :(
This part of the code doesn't make sense to me and since your Trigger properties are all messed up on my side, would you be able to recopy and paste please?
Also, your Function DamageUnit, I can't seem to find it either.
Is there a way I can make these regions visible so I can tell if the code is triggering or not?
.: EDIT :.
Oh I just noticed in your custom script you also have a Function called "AvgPoints", this eludes me also.
I have no idea why all your code is broken on my side :S
0
I'm not understanding this part of the code... Also, the editor keeps erroring on your custom script too.
.: EDIT :.
I have noticed in your Triggers that you have a Function that looks to be for the way to create a rectangle region between the turrets. However it looks messed up on my side for some reason...
0
Thanks, I will have a look.
Your code is very hard to read btw :p I can't understand how you have chucked so many if statements together under a single IF.
0
Cheers for the map... I will look over it.
In the meantime tho, I had figured out why my beam wasn't triggering... It was because the Unit Arc was set 0. Simple change to 360 fixed that issue.
So all I need to look at your map for, is how you handle the damage zone.
BTW, do you know how to offset the Beam (effect) so that it would appear say 2m above the Unit instead of from its center?
0
Grrr... I have duplicated that effect verbatim and recreated the Beam ability from your map.
It will not work for me... The beam ability doesn't trigger from what I can tell. I gave the ability to a structure and I am targeting a structure. I thought maybe it was because it needed to target a Unit, so I changed those parameters to structures and nothing :(
Also, I can't choose the Beam ability in the script... Maybe because it doesn't have a sub command???
.: EDIT :. Then DamageUnit((Picked unit), (Triggering unit), damage) Else
Where did you get that from?
0
@SBeier: Go
Yeah that wouldn't work for a TD map tho :(
Could I however make the Tower fire arc of 360deg, then when a unit comes in its range, it then does the trigger to see if the unit is crossing its beam?
0
@SBeier: Go
Awesome stuff! Cheers for the reply... I will definitely have to have a play with that and see what I can come up with. My only concern is that you mention a region trigger... This really wouldn't work if the tower placement wasn't fixed. IE if the player places a tower, how would there be a region trigger? Or can you add those with tower placement?
0
Hey guys,
I've had a search around the forums and haven't quite found what I am after.
I am creating a TD map and there is an ability that I want to make but for the life of me, can't figure it out. Basically I want a Tower to emit a beam to another Tower, then any mob that passes through that beam, gets dealt X damage. Kind of like a laser fence, but spans between the chosen towers.
I had found some threads in regards to linking a slave unit to a master which would be good to determine host Tower to receiving tower. But I don't know how to make this variable beam deal damage to anything that crosses it.
.: EDIT :. Just had a thought about connecting the towers. Is there a way to make a Tower auto connect and beam to another Tower of the same type WITHIN its range. So if you had 3 in the range of each other, all would have beams shooting to them?