Thats soo cool!
And I might join this one :P
Hi. I tried to search for this but I don't know what it is called.
The thing I'm trying to do is to get the stuff you see under the actual tower in a Tower Defense. So you can easy tell how much ground the tower is covering. I know what model but not how to attach it under the tower in the best way.
Should I just spawn another unit under the tower? I don't think that is the smartest idea. I have looked at Events in the actors tab but I'm not too good at this so I don't really know what to edit and how. But I think I should do something here, right?
If not please tell me how. Happy for help :)
Working on it.
Edit: done. and feel free to edit my stuff :D
This is going to be really cool! I think these kind of projects are really funny. We should do more in the future!
I will also try edit the map some more but not now. Great job so far everyone!
I don't know that there is a limit. And editing more times is just great i think.
So I hope Mozared won't be angry if you edit it more times (I don't think he will :D ) So you go ahead and edit the map more :)
Just don't over do it.
Working on it!
Edit: Done but the mine i made is maybe too close to the boarder. So we might need to fix that (just noticed)
Thanx, I will try to find my problem. I'll edit this if I find it :D
Edit: Lol forgot to edit this. But I found the problem:
My move command was inside of my if-statement. So when I move it outside of it everything worked because then the trigger would find number zero too. Thanks for the help! Much appreciated.
Quote from Builder_Bob: Go
I have just skimmed your trigger, but one thing that is apparent right away is that your array is only 7 long. try: length = 0 <Integer> this will let you store values in indexes 0-7.
I think this is wrong. As all of my other arrays is built with this system this cannot be it.
But I have maybe found a flaw: when all of the P's are visited and there is only 1 left (number 0) there is nothing to compare with so the trigger thinks that there is no more P's to go to. I don't really know but that it what I see. Though I don't know how to fix this :P
It works well except that U moves to all locations but P(0). It chooses the shortest path every time but stops when there is one left (always number 0)
Here is the trigger:
Run AI Events Local Variables i = 0 <Integer> length = 0 <Integer> near = 0 <Integer> p = No Point <Point> u = Move.unit <Unit> Conditions Actions General - For each integer i from 0 to 7 with increment 1, do (Actions) Actions Variable - Set length[i] = (Pathing cost between (Position of u) and (Center of Objective.region[i])) General - For each integer i from 0 to 7 with increment 1, do (Actions) Actions General - If (Conditions) then do (Actions) else do (Actions) If (Owner of Objective.beacon[i]) != 2 Then General - If (Conditions) then do (Actions) else do (Actions) If length[i] < length[near] Then Variable - Set near = i Variable - Set p = (Center of Objective.region[near]) Unit - Order u to ( Move targeting p) (Replace Existing Orders) Else Else
Btw, the trigger is fired every time U reaches his destination.
But thanks for this so far. -Ralme
I have a unit (lets call it "U"). U will have to go to 1 out of 8 checkpoints (lets call them "P"). But I want U to go to the nearest P.
I thought I would use the "Pathing cost between points" to calculate the length from U to each of the P's. And then maybe store them in an array.
And now for the question: How do I compare multiple integers (or reals) and check which one is the smallest (or largest)?
Happy for answers! :D
Thats it for now :D