Tutorial Casting Speed

A

acuben

Guest
Setting Casting Speed for a spell(s)
Difficulty: easy
Tools required: none, only use of triggers.
What does this do: Instead of having a fixed casting time. You can increase casting speed with buffs/items/auras/etc.




First of all. It's not really a smooth, bug-proof trigger so if you find any problems, feel free to post it. Besides, I don think I know much about these map editting much anyways...

If someone have a better version, oh well :>


Variables
CSTriggerIsOn (array) - default: false (Boolean variable)
Caster (array) (unit variable)
PlayerNumb (Integer variable)

Event:
Unit - A unit begins channeling an Ability // i guess you can try "Begin casting an ability" also, but that might not work, dunno why. It's worth a try tho

Condition:
( Ability being cast ) = Fireball //not required if you want to apply casting speed for every spell.
CSTriggerIsOn[Player number] = Equal to false

Action:
Set CSTriggerIsOn[Player number] = true // Or u can move this trigger down and use...
// Set CSTriggerIsOn[Variable(PlayerNumb)] = true.
//This Trigger is to prevent trigger being run again before it ends. I think there may be more efficient way to do this... iono, lemme know.


Set PlayerNumb = Player number //This trigger is to remember the owner of the casting unit. Reason why this is useful is when other player with same unit cast something, there won't be collision. It's not required if this trigger only applies to one player

Set Caster[Player number] or Set Caster[Variable(PlayerNumb)]
//This trigger is to remember whatever the casting unit is

//now to pause the caster.
unit- pause Caster[Player Number]

Wait - 5 seconds // Right here is fixed time, but you can make Item/buff comparison and use some math to subtract the time using If/then/Multiple action Trigger

Unit - unpause Caster[variable(PlayNumb)] // really I was hoping this trigger didn't cause any problem by unpausing every "Caster" Variable for every player. I guess time will tell.

Set Variable - Set CSTriggerIsOn = false // required to run this trigger again.


For Casting Speed (I don' think most of you need this party anyways)
set variable: CastingSpd (Array) (integer) (Default: 100)
and if there is an item that provides 20% casting speed. Add 20 to CastingSpd variable. If it's dropped, subtract 20.

If a spell requires 5 seconds to cast (for simplicity)
Casting Time can be... (and let's assume you have a buff that increase the casting speed by 30% and it's called Haste)
5 * 100 / [ CastingSpd(player1) + (If there is Haste buff, add 30, else do nothing)]

And that number can be substituted for "5 seconds" in the trigger above

***
And Finally, if you want to add casting speed "interference". I guess you can make another trigger to order a casting unit to stop (or chance to stop) when attacked while CSTriggerIsOn variable is true while unpausing that unit. Another trigger to do the same when the player types "s" for stop... meh >_>



TroubleShoot:
If your unit is paused and never unpaused (if that happens, please let me know).
Try increasing Casting speed in Object editor and before pausing in triggers
For e.g. in Object editor
Make Firebolt cast time to 0.20 sec
And in Trigger, try "Wait - 0.10 sec" Trigger after setting the variables.



Current Limitation:
1. 1 per player, unless other triggers are used to modify it. Quiet annoying, but shouldn't be impossible.
edit: ...actually right now, I don't think it even supports more than 2 players. I would have to modify it a bit... later. Do tell me if it works :D.

Unit - unpause Caster[variable(PlayNumb)] // really I was hoping this trigger didn't cause any problem by unpausing every "Caster" Variable for every player. I guess time will tell.
If I change this part to "Unit - unpause Caster[Player number of (triggering player)]" would it work? Normally it seems like WE forget what the "triggering player" is after using "wait" action...

2. It can be abused, buggy if the timing isn't right. If you cancel spell right after you are unpaused. Well you canceled it. If you cast the spell right after, you can cast the spell "instantly" this time.



other notes: don't expect too much from me, i'm newb

i made this for myself mainly. It seemed like Buffer/Debuffer mage classes in my rpg had no use of magic power bonus from magic weapons (staff, rod, etc). Well, now they do ;p

comment? suggestion(plz!)? criticism?
 

gref

New Member
Reaction score
33
Couple of points:
A) it pauses the caster so you can't cancel casting a spell. If you are making a custom system you really should make it so that spells can be aborted before they are cast.
B) Tidy it up a bit 00.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top