Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Independently Recharging Charges
[Solved] Independently Recharging Charges
Dec 6 2010, 7:30 pm
By: ImagoDeo  

Dec 6 2010, 7:30 pm ImagoDeo Post #1



Does anyone have any idea how to do this? I can't find any already-scripted method, so it would have to be some rigged system with behaviors or something. But I can't figure out how to prevent casting an ability until a behavior is detected on the unit. Besides that, I can accomplish everything that I need to rig something with behaviors, but this is defeating me.

Or is there some easier way to do it that I'm blind to?

Post has been edited 1 time(s), last time on Dec 9 2010, 4:53 am by ImagoDeo.



None.

Dec 6 2010, 8:53 pm Temp Post #2



Setting Time Start under where you set the costs for charges will make it regen 1 at a time every X seconds that you specified there.

Time Use will do the same thing but will only start once they use a charge.



None.

Dec 6 2010, 8:56 pm NicholasBeige Post #3



I've never played with charges, but I can suggest this:

Use a Behaviour on the unit which enables or disables an upgrade - and this upgrade effects whether or not the ability in question can be used. Then you put a validator (somewhere, I havn't used these either), that checks if charges remaining are >= 1, if they are, remove the behaviour, if they arn't add the behaviour. Should work, in theory?



None.

Dec 6 2010, 9:08 pm ImagoDeo Post #4



Quote from Temp
Setting Time Start under where you set the costs for charges will make it regen 1 at a time every X seconds that you specified there.

Time Use will do the same thing but will only start once they use a charge.

Erm, no. I tried that already, and all it gave me was some kind of stacking cooldown on the ability rather than independantly recharging charges.

@Cardinal - That might work, but it still doesn't solve the problem of the independant 30-second cooldown per charge that I'm going for.

What I'm currently doing is using a requirement system to prevent the ability from being used unless the unit has a specific behavior. The behavior, when removed, applies a timer behavior that expires after 30 seconds and reapplies the first behavior. It works fine, except that I can't figure out how to remove the first behavior when the ability is used. If I could figure that out, the system would work perfectly.

No doubt I could do it with triggers, but this is for the SEN Arena, and the less triggers imo the better. (Also I'm a newb at SC2 triggers.)



None.

Dec 6 2010, 9:18 pm Temp Post #5



It does work, I tried it before posting. Forgot to mention that the timer seems to reset when a charge is used though. You seem to be talking about time use, which does stack the cooldown for each charge used but still adds more charges.

There is a remove behaviour effect which does what you want. Also the unit compare behaviour count validator does exactly what you want with no requirements. Just put it on the effect of the ability instead of the ability itself.



None.

Dec 6 2010, 11:11 pm ImagoDeo Post #6



Quote from Temp
It does work, I tried it before posting. Forgot to mention that the timer seems to reset when a charge is used though. You seem to be talking about time use, which does stack the cooldown for each charge used but still adds more charges.

There is a remove behaviour effect which does what you want. Also the unit compare behaviour count validator does exactly what you want with no requirements. Just put it on the effect of the ability instead of the ability itself.

You're sure it works? And it's independant? I don't have time to test it myself at the moment, but I will if you don't get back to me before I can.

I know about the remove behavior effect. In fact, that's what I'm using to remove it. But how can I hook up that particular effect to the ability so that it fires simultaneously with the teleport effect?

I know about validators, too, and I would have used one except I didn't know for certain whether or not it would prevent the ability from being used. You're sure it would?



None.

Dec 7 2010, 12:07 am Temp Post #7



I've tested it. Every X seconds it will add a charge up to the max amount. Using a charge will reset the counter. Having 0 charges and using it will show a cooldown.

Validators on effects prevent the effect from firing. The set effect will allow you to have multiple effects from a single ability.



None.

Dec 7 2010, 4:14 am ImagoDeo Post #8



Quote from Temp
I've tested it. Every X seconds it will add a charge up to the max amount. Using a charge will reset the counter. Having 0 charges and using it will show a cooldown.

Validators on effects prevent the effect from firing. The set effect will allow you to have multiple effects from a single ability.

All right, I'll check that out. Thanks.

I know what validators do. And the Set effect didn't work, because it screwed with targeting. The teleport spell target is an arbitrary point, whereas the remove behavior effect target is the caster, so with a set effect the remove behavior effect took precedence and the spell could only be cast on the caster, which negated the teleport completely.



None.

Dec 7 2010, 4:19 am NicholasBeige Post #9



How (exactly) were you using the Set effect?

A Set is just a group of other effects which can be triggered simultaneously.



None.

Dec 7 2010, 7:25 am Temp Post #10



You would just use a set effect targeting a point. Put both the remove behaviour and the teleport in there. On the remove behaviour change the Unit - Unit value to Caster.



None.

Dec 8 2010, 1:37 am ImagoDeo Post #11



Yeah, I didn't mess around with it too much after the first failure. Don't worry, I'll keep looking at it.



None.

Dec 8 2010, 4:48 am ImagoDeo Post #12



Ok, worked. You can mark this as Solved. Thanks.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2022-6-29. : 8:18 am]
GGmano -- I would have released my New map yesterday if scmdraft didnt fail on saving the merged file
[2022-6-29. : 8:17 am]
GGmano -- Not cool when I made such Nice system and I could make it even better if more trigger allowed
[2022-6-29. : 8:16 am]
GGmano -- Damn now I have reduce trigger amount impossible to save fil
[2022-6-27. : 11:03 pm]
jjf28 -- GGmano
GGmano shouted: its not possible to move around a p12 owned preplaced a
when I tried - ya not possible
[2022-6-27. : 11:02 pm]
Zoan -- idk, maybe if you change a setting with euds you can do it. Something like the Unit List and Palletes thing or whatever it's called
[2022-6-27. : 9:42 pm]
GGmano -- i thought that would be easy but dont work on my test
[2022-6-27. : 9:42 pm]
GGmano -- its not possible to move around a preplaced p12 owned dark swarm?
[2022-6-27. : 9:41 pm]
GGmano -- dark swarm
[2022-6-27. : 9:41 pm]
GGmano -- its not possible to move around a p12 owned preplaced a
[2022-6-27. : 1:08 pm]
jjf28 -- having played the architect just fine - no not necessarily
Please log in to shout.


Members Online: MidNighTime, Roy