Complex custom spell problem (triggers)...

  • Thread starter Thread starter Nikolae
  • Start date Start date
N

Nikolae

Guest
Ok guys, I'm making this trigger-based heal over time spell, but I had to work it out to use two triggers. It will work for a couple casts, but then it just stops working... Help!

Trigger 1 sets the variables used in Trigger 2.
Code:
Renew Init
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Renew 
    Actions
        If (RenewKey Equal to 50) then do (Set RenewKey = 0) else do (Do nothing)
        Set RenewKey = (RenewKey + 1)
        Set RenewActive[RenewKey] = True
        Set RenewTarget[RenewKey] = (Target unit of ability being cast)
        Set RenewTick[RenewKey] = 0
        Set SpellLVL = (Level of (Ability being cast) for (Casting unit))
        Set SpellReal = ((Real((Intelligence of (Casting unit) (Include bonuses)))) x (Real(SpellLVL)))
        Trigger - Run Spell Crit <gen> (checking conditions)
        Set SpellReal = (SpellReal / 15.00)
        Set RenewHealValue[RenewKey] = (Integer(SpellReal))

Trigger 2 runs the heal effect for all current instances of 'Renew' running.
Code:
Renew Action
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 50, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RenewActive[(Integer A)] Equal to False
                    Then - Actions
                        Skip remaining actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                RenewTick[(Integer A)] Greater than or equal to 15
                            Then - Actions
                                Set RenewActive[(Integer A)] = False
                            Else - Actions
                                Unit - Set life of RenewTarget[(Integer A)] to ((Life of RenewTarget[(Integer A)]) + (Real(RenewHealValue[(Integer A)])))
                                Floating Text - Create floating text that reads (String(RenewHealValue[(Integer A)])) above RenewTarget[(Integer A)] with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
                                Floating Text - Change the lifespan of (Last created floating text) to 1.00
                                Floating Text - Change the fadepoint of (Last created floating text) to 0.50
                                Floating Text - Change permanent state of (Last created floating text) to Disable
                                Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                                Set RenewTick[(Integer A)] = (RenewTick[(Integer A)] + 1)

~Nik
 
Try using this and add the extra stuff u want to it...
Code:
Using Renew
Event: Unit begins casting an ability
Conds: Ability being cast = renew
Acts: -Set (unittoheal) = target unit of ability being cast
-set userenew = true
-wait .1 second
-Turn on trigger Heal

Heal
Events: Every .1 seconds
Conds: *unittoheal = structure = false
*userenew = true
Acts: -set unittoheal life = unittoheal life + 1
-wait til unittoheal life = max unittoheal life
-turn off this trigger
-set userenew = false
-set unittoheal = no unit
Simple trigger not needing nearly have the stuff u have... ;)
All u need are 2 vars Unittoheal (unit), and userenew (boolean)
 
Yeah, that helps a little bit, but the design of that spell needs to be maintained. I just need it to work correctly! lol

~Nik
 
If it weren't for the floating text, I'd recommend "Rejuvenation".

> the design of that spell needs to be maintained.

And that "design" would be?


What is "Spell Crit <gen>" doing?
 
The only problem with using the 'check for rejuvenation' idea, is that the amount rejuvenated is potentially different for each target, as the amount healed is based on the caster's agility.

Design:
The spell is supposed to heal a target over time, but the amount healed is determined on the intelligence of the casting hero. Floating text is created every time there is a heal 'tick' over the healing unit(s).
SpellCritical is just a little script that runs each time the spell is cast, with a chance of increasing the SpellReal variable by 1.5. This is not the issues as it is used in various spells.

Thanks for the help so far guys, keep it coming!
~Nik
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top