Looking for some suggestions on how to implement my casting system

Chilling

New Member
Reaction score
1
Alright, here's what happened:
I had my casting system all planned out. First, you use the skill 'Begin Channeling'...
Trigger:
  • Channeling
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Begin Channeling
    • Actions
      • Unit - Add Aid to (Triggering unit)
      • Unit - Add Sorcery to (Triggering unit)
      • Unit Group - Add (Triggering unit) to ChannelingUnits

Now each second of time you've been in the unit group...
Trigger:
  • Channeling 2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ChannelingUnits and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Channeling Time to ((Current research level of Channeling Time for (Owner of (Picked unit))) + 1) for (Owner of (Picked unit))

And if you stop casting...
Trigger:
  • Channeling 4
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Begin Channeling
    • Actions
      • Game - Display to (All players) the text: Stopped
      • Player - Set the current research level of Channeling Time to 0 for (Owner of (Casting unit))
      • Unit Group - Remove (Casting unit) from ChannelingUnits

So the skills it gives you (Aid and Sorcery) and spellbooks that will include all of the skills in those trees. Each skill requires a certain level of the channeling time upgrade. In other words, each skill requires a certain amount of time casting before it's availible for use.
Problematically, you can't the level of an upgrade after it's upgraded. So now I'm stumped.
I can't find a way to disable the skills without completely removing them. I could just order the unit to stop if they try to cast a spell that requires more casting time than they have, but then they would have to start channeling all over again...which would be inconvenient.
Any suggestions?

Thanks for reading the large post and thanks for your replies!
 

TomTTT

New Member
Reaction score
44
There's a simple GUI function
Trigger:
  • Player - Disable ABILITY for PLAYER

and in the same actions, you can change it to enable.
Trigger:
  • Player - Enable ABILITY for PLAYER

I'm not sure thats your problem, but maybe instead of research level, try making this an integer variable? a lot easier, I think.
 

Chilling

New Member
Reaction score
1
Yeah, I thought of that, but I'd much rather prefer it if you knew which skills you could use and when you can use them. If I disable the skill, it will disappear altogether and the player won't know that they have it.
Another problem with that is I'm not sure how compatable it is with spellbooks (such as, will it affect spellbook skills, can you add spellbook skills from the trigger editor, etc)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
this:
Trigger:
  • Player - Set the current research level of Channeling Time to 0 for (Owner of (Casting unit))

doesnt work, you cannot un-research an upgrade. the research level cannot drop, only increase.
 

HydraRancher

Truth begins in lies
Reaction score
197
What I would do is give the unit the ability Channel, but keep the option to keep it hidden true, so your unit cannot see the ability. Then, use the trigger to increase the level of the Channel.

EDIT: Then again, that would need you to make a lot of levels for the channel.
 

Chilling

New Member
Reaction score
1
Well, that won't really help very much :(
Sadly, the entire upgrading thing doesn't work, so you won't get to cast a spell that requires 3 cast time, then one that requires 2 if you had 5 cast time originally, etc.
I suppose I'll have to make each spell based off of Channel, change the base order ID, and trigger it to cast for a certain amount of time before it's triggered to do its affects. Or I could use skills with a regular 'cast time'...but I'm not sure how that'd work (with GUI you never know)
 

Chilling

New Member
Reaction score
1
Well, as I've previously noted, the researching is for the user convenience. This way, it will say "Requires 1 Second of Channeling" or something similar. And, as I also have previously noted, if I did it with an integer array, if they try to cast a spell and they don't have enough cast time, then they'll lose all of their cast time because they'd have to stop casting and they won't get anything out of it.
 

Sajin

User title under construction.
Reaction score
56
Why not make a stop channeling skill that shows while they're currently channeling and for every second increase an integer value and when they end it deal damage or use a skill corresponding to the seconds channeling (and maybe add like a count that shows over top of the caster?
 

HydraRancher

Truth begins in lies
Reaction score
197
Well, as I've previously noted, the researching is for the user convenience. This way, it will say "Requires 1 Second of Channeling" or something similar.

Then make it require a unit, called 1 Second of Channeling, and do it for all the possible ammounts, and create this dummy (make it invisible, no shadow, locust, etc.) and destroy it at the right times.

And, as I also have previously noted, if I did it with an integer array, if they try to cast a spell and they don't have enough cast time, then they'll lose all of their cast time because they'd have to stop casting and they won't get anything out of it.

The same thing would happen with your method?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Could you have an Engineering Upgrade (EU) skill to upgrade these abilities? Each second of channeling, give the EU for the current skill level to the channeling unit, and you can remove the EU to lower the upgrade level too.
 

Chilling

New Member
Reaction score
1
Well, what I'm doing now is just making each skill a channeling skill in its own and triggering it to wait until they've channeled X seconds, then doing the effects. And yes, I was going to put the floating text in so they know how long they've been casting.
 

HydraRancher

Truth begins in lies
Reaction score
197
Could you have an Engineering Upgrade (EU) skill to upgrade these abilities? Each second of channeling, give the EU for the current skill level to the channeling unit, and you can remove the EU to lower the upgrade level too.

That would be very effective if used correctly. Then there would be no problem with casting time and things.
 

Chilling

New Member
Reaction score
1
Then make it require a unit


The same thing would happen with your method?

Can you make a spell require a unit..?

The same thing wouldn't happen with my original method because you can't even try to cast it until you have the upgrade finished, in which case you'll have casted the appropriate amount.
It wouldn't be a problem with the second method, either.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Engineering Upgrade is a skill of the Tinker. If Tinker has Cluster Rockets, and an Engineering Upgrade skill that replaces Cluster Rockets with Shadow Strike, then he no longer has Cluster Rockets, but he does have Shadow Strike. The drawback is that it only works on Hero Abilities, but since your abilities are added through triggers, there should be no problems.
 

HydraRancher

Truth begins in lies
Reaction score
197
Can you make a spell require a unit..?

Hang on a sec, I'll check.

EDIT:

Problem: The spellbooks are unit abilities. Engineering Upgrade won't work. I think.


EDIT 2: Sadly, a skill cannot have a unit as a tech tree requirement. :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top