I want to unit to morph when its shield reach 0 but i cant seam to figure out how to set the autocast / automatic ability to work and need help with it.
If i remove the validator then it morph directly when its created. When i have that validator it never morph even if the shield is removed my damage to it.
Sorry about that, i had it removed during the screenshot, have been testing it back and forth and on that picture it was gone.
Yes i could make a behavior that issue an order to use the ability BUT i don't want allot of unnecessary things, better to have all in one ability then 1 behavior, 1 effect and one ability.
Ohh i missed the validate unit field, gonna check and see if that make any difference.
Nope no difference, the automatic flag "works" without the validator but not the auto cast.
Can't check by myself now cuz i'm browsing from phone, but the validator for autocast should stay there. Try change autocast range and other autocast related fields or mb ability flags (is there allow self cast flag?), or mb autocast target filters.
Challenge accepted. Done it in like 5-10min. First I made sure the siege tank could auto-siege and tested what was the minimum required fields so that it works. Then I added a validator.
The actor issue is about the shield animation and not the auto-cast. That you'll have to figure it out by yourself. xD And you probably want something like "replace current order" idk where would be such a thing so even if the tank is attacking or moving, it siege up instead of only when idle.
Edit: it seems like my example is not optimal yet as if you have multiple siege tanks close and one has no shield they all siege up. So there is probably something to do with minimum/maximum target or maybe the requirements: Self required.
Tried to enter all fields you did and it still wont change, stupid ability Freaking confusing and irritating :)
Edit: Something is seriously very wrong here. If i place the units in the editor with the ability then they morph directly when map start BUT when i add them with a trigger every 5 sec then they dont morph (no validator).
I finally found out what was wrong with my validator. If I understand correctly, if the validator returns true, it prevents the ability... (even if that sounds weird) So setting my validator to "Greater than: 0 shield" did work as we want.
If you want I could take a look at your map?
Edit: I'm still confused though about when tanks are close...All near tanks must have 0 shield for all of them to siege. If spreaded, it works fine.
Ok so, I don't know where your tank with shield is, but one thing is sure, try to never use "Periodic Trigger" as event. This is extremly laggy. To prevent such thing while keeping the same refresh rate for your minimap, I suggest you to use a While loop and tell to run the trigger once. Same thing goes with all the other periodic triggers you have. That will really help about laggyness. Another thing about lag is the "General - For each integer i from 1 to 100 with increment 1, do (Actions)" That could cause some lag spike everytimes it is execute. Watch these... I'm also worried about all the events about highlighted units, mouse move, etc.
Well... there is a few hours of work for sure behind this...and there is place for optimisation most likely. You have there something interesting, but the core of the core doesn't looks completed yet =P
Edit: Wait a minute... you want the weird unit that constantly spawns with shield to be the kind of tank? That it does something when out of shield?
Edit: I think I understand your goal. Here is what I saw.
First of all, you must make sure that your ability to morph is manually useable. If you manually can't activate it, the auto cast will not work for sure. What I saw when manually trying the ability is that it has a food cost and that the button is greyed. Which means...
food cost to fix on "Tentacles Harvested" (Because you morph to this unit, it shows the food cost difference and you must respect it... in order to make it works, you have to change the supply cost to 0)
Unit flag to uncheck uncommandable on "Tentacles" (You probably set that to make sure the player doesn't mess around with it... however, this prevents the ability to be used. So find another solution than uncommandable I guess :P )
So far from what I see...
auto cast filters, not usefull
auto cast max not usefull
auo cast range not usefull
auto cast min ehmm either it makes it constantly works or it doesn't (I guess there is something around that point that will make it works as intended.)
validator must be false to make the ability execute (energy req. greater than 0) (This looks weird even to me... but it seems like that is how it works oO? But thinking of it... if "Equal 0" this means its false...why it doesn't execute? Ahhh I'm to bored to understand that.)
I hope this gives you some little help of some kind... As a recap, before making an ability auto-cast, make sure it works. :P
Thanks mate gonna have a look at everything you said.
Edit: Ok it was the food issue, it works perfect now! To think that it was in the unit tab and not in the ability :) I thought it worked when it used the ability on already placed units thats why i did not test it more.
Update: About the mouse move issue. The only way to get the mouse x/y pos in the world is by the mouse movement trigger. How am i supposed to make a loop from that? Cant see any good solution to that.
I have fixed most of the for int from 1 -100 by adding breaks when it found what it was looking for. for the "every 1 sec" and so on i added a while case with a wait timer on 1 sec. The triggers should run allot less now and it will break all the for cases allot faster.
I'm not really sure about the highlight case so far, will have a look on that.
Alright. I'll look into mouse movement tonight maybe...if i think of it. Otherwise there are probably some good tuto about the best way to do a mouse movement system.
I want to unit to morph when its shield reach 0 but i cant seam to figure out how to set the autocast / automatic ability to work and need help with it.
If i remove the validator then it morph directly when its created. When i have that validator it never morph even if the shield is removed my damage to it.
I'm not super good in the editor but, what about adding a behavior that constantly check if the unit has shield, if not do the effect/ability.
Working on projects:
Where are you putting the validator in your morph ability? I can't see it anywhere in the image.
The problem could be because the validator's Validator: Unit + field is set to target and not caster.
Sorry about that, i had it removed during the screenshot, have been testing it back and forth and on that picture it was gone.
Yes i could make a behavior that issue an order to use the ability BUT i don't want allot of unnecessary things, better to have all in one ability then 1 behavior, 1 effect and one ability.
Ohh i missed the validate unit field, gonna check and see if that make any difference.
Nope no difference, the automatic flag "works" without the validator but not the auto cast.
U need to put dat validator in auto-cast validator field instead
@abvdzh: Go
I don't get the auto cast function to work at all, only the "automatic" flag with no validator.
I now changed to auto cast and added the validator but nothing happen at all.
Can't check by myself now cuz i'm browsing from phone, but the validator for autocast should stay there. Try change autocast range and other autocast related fields or mb ability flags (is there allow self cast flag?), or mb autocast target filters.
Been testing allot now :D
If anybody want to try then give a siege tank shields and make the validator i made.and then try to get it to siege when it has no shield.
@Sherlia: Go
Challenge accepted. Done it in like 5-10min. First I made sure the siege tank could auto-siege and tested what was the minimum required fields so that it works. Then I added a validator.
The actor issue is about the shield animation and not the auto-cast. That you'll have to figure it out by yourself. xD And you probably want something like "replace current order" idk where would be such a thing so even if the tank is attacking or moving, it siege up instead of only when idle.
Edit: it seems like my example is not optimal yet as if you have multiple siege tanks close and one has no shield they all siege up. So there is probably something to do with minimum/maximum target or maybe the requirements: Self required.
Edit: My validator is not doing the job...
Working on projects:
Tried to enter all fields you did and it still wont change, stupid ability Freaking confusing and irritating :)
Edit: Something is seriously very wrong here. If i place the units in the editor with the ability then they morph directly when map start BUT when i add them with a trigger every 5 sec then they dont morph (no validator).
@Sherlia: Go
I finally found out what was wrong with my validator. If I understand correctly, if the validator returns true, it prevents the ability... (even if that sounds weird) So setting my validator to "Greater than: 0 shield" did work as we want.
If you want I could take a look at your map?
Edit: I'm still confused though about when tanks are close...All near tanks must have 0 shield for all of them to siege. If spreaded, it works fine.
Working on projects:
Here you go :)
@Sherlia: Go
Ok so, I don't know where your tank with shield is, but one thing is sure, try to never use "Periodic Trigger" as event. This is extremly laggy. To prevent such thing while keeping the same refresh rate for your minimap, I suggest you to use a While loop and tell to run the trigger once. Same thing goes with all the other periodic triggers you have. That will really help about laggyness. Another thing about lag is the "General - For each integer i from 1 to 100 with increment 1, do (Actions)" That could cause some lag spike everytimes it is execute. Watch these... I'm also worried about all the events about highlighted units, mouse move, etc.
Well... there is a few hours of work for sure behind this...and there is place for optimisation most likely. You have there something interesting, but the core of the core doesn't looks completed yet =P
Edit: Wait a minute... you want the weird unit that constantly spawns with shield to be the kind of tank? That it does something when out of shield?
Edit: I think I understand your goal. Here is what I saw.
First of all, you must make sure that your ability to morph is manually useable. If you manually can't activate it, the auto cast will not work for sure. What I saw when manually trying the ability is that it has a food cost and that the button is greyed. Which means...
So far from what I see...
I hope this gives you some little help of some kind... As a recap, before making an ability auto-cast, make sure it works. :P
Working on projects:
Thanks mate gonna have a look at everything you said.
Edit: Ok it was the food issue, it works perfect now! To think that it was in the unit tab and not in the ability :) I thought it worked when it used the ability on already placed units thats why i did not test it more.
Update: About the mouse move issue. The only way to get the mouse x/y pos in the world is by the mouse movement trigger. How am i supposed to make a loop from that? Cant see any good solution to that.
I have fixed most of the for int from 1 -100 by adding breaks when it found what it was looking for. for the "every 1 sec" and so on i added a while case with a wait timer on 1 sec. The triggers should run allot less now and it will break all the for cases allot faster.
I'm not really sure about the highlight case so far, will have a look on that.
Big thanks so far :)
Alright. I'll look into mouse movement tonight maybe...if i think of it. Otherwise there are probably some good tuto about the best way to do a mouse movement system.
Edit: not tonight... boreddd....
Working on projects: