Help finding error with spell

b_ray210

Active Member
Reaction score
1
Hey y'all. So i took a long break from creating and now I'm completely useless... I'm trying to create a spell based off of critical strike (for the never miss option) which doesnt actually do bonus damage but instead, the hero which has the passive spell (called Chevalier) has a chance to go into a state of maximum attack speed for a couple seconds. For some reason my hero never gets the speed bonus. There is also supposed to be a 5 second buffer time between casts. Please take a look and tell me my error! :p

Code:
Chevalier
    Events
        Unit - A unit Is attacked
    Conditions
        ((Unit-type of (Attacking unit)) Equal to Highland Archer) and (chevalierlearned Equal to True)
    Actions
        Set chevalierrandomint = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                chevaliertimeelapsed Equal to True
                chevalierrandomint Less than or equal to (20 + (5 x (Level of Chevalier  for chevaliercaster)))
            Then - Actions
                Unit - Create 1 dummy for (Owner of chevaliercaster) at (Position of chevaliercaster) facing Default building facing degrees
                Unit - Add dummychevalierfrenzy  to (Last created unit)
                Unit - Set level of dummychevalierfrenzy  for (Last created unit) to (Level of Chevalier  for chevaliercaster)
                Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy chevaliercaster
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                Set chevaliertimeelapsed = False
                Wait 5.00 seconds
                Set chevaliertimeelapsed = True
            Else - Actions
                Do nothing
 

jonas

You can change this now in User CP.
Reaction score
67
Before we start delving into your code, does the trigger ever run? Is chevaliertimeelapsed True in the beginning of the map (or is it set to True anywhere else)? Are you setting chevaliercaster correctly?

Kind regards, jonas
 

b_ray210

Active Member
Reaction score
1
Oh yes sorry! I should've included that as well. At map initialization I set chevalierlearned=false and when the spell is learned:
Code:
Chevalier Initiation
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Chevalier
    Actions
        Set chevalierlearned = True
        Set chevaliertimeelapsed = True
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top