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.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy