Help with multiple triggers, specifically custom spell

ninjaalamode

New Member
Reaction score
0
I need help getting these four triggers to work. They're for a hero based custom game I'm making. The first gives you your hero picking unit (but it doesn't select it), the second creates the hero at the starting region (but again, the hero is not selected). The third and fourth triggers are two spells that go together, the third damages the enemy, and creates a unit at the targeted enemy (but the trigger doesn't seem to turn off after it is used, and doesn't seem to turn on the fourth trigger), and then the forth is on the created unit, it calls back the created unit... but the fourth does not work, or rather, because of the third not working it is never on, and thus cannot work.

Code:
Spawn Hero Picker Red
    Events
        Map initialization
    Conditions
        (Player 1 (Red) controller) Equal to User
    Actions
        Unit - Create 1 Hero Picker for Player 1 (Red) at (Center of Hero Picker <gen>) facing Default building facing degrees
        Unit Group - Add (Last created unit) to (Units currently selected by Player 1 (Red))
        Camera - Pan camera for Player 1 (Red) to (Center of Hero Picker <gen>) over 0.00 seconds

Code:
Guido Mista
    Events
        Unit - A unit enters Pick Guido Mista <gen>
    Conditions
        ((Owner of (Entering unit)) controller) Equal to User
    Actions
        Unit - Remove (Entering unit) from the game
        Unit - Create 1 Guido Mista for (Owner of (Entering unit)) at (Center of Hero Start <gen>) facing Default building facing degrees
        Set GuidoMista = (Last created unit)
        Camera - Pan camera for (Owner of GuidoMista) to (Position of GuidoMista) over 0.00 seconds
        Unit Group - Add (Last created unit) to (Units currently selected by (Owner of GuidoMista))
        Unit - Create 1 Sex Pistols 1 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[1] = (Last created unit)
        Unit - Create 1 Sex Pistols 2 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[2] = (Last created unit)
        Unit - Create 1 Sex Pistols 3 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[3] = (Last created unit)
        Unit - Create 1 Sex Pistols 5 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[5] = (Last created unit)
        Unit - Create 1 Sex Pistols 6 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[6] = (Last created unit)
        Unit - Create 1 Sex Pistols 7 for Player 12 (Brown) at (Center of Sex Pistols loaded <gen>) facing Default building facing degrees
        Set SexPistols[7] = (Last created unit)

Code:
Stand Shoot Sex Pistols
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Stand Shoot- Sex Pistols 
    Actions
        Unit Group - Pick every unit in (Units in Sex Pistols loaded <gen>) and do (Actions)
            Loop - Actions
                Set LoadedSexPistol = (Random unit from (Last created unit group))
                Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (Random real number between 1.00 and 10.00) damage of attack type Spells and damage type Normal
                Unit - Move LoadedSexPistol instantly to (Position of (Target unit of ability being cast))
                Unit - Change ownership of LoadedSexPistol to Player 1 (Red) and Change color
                Unit Group - Add LoadedSexPistol to (Units currently selected by (Owner of GuidoMista))
                Unit - Remove Stand Shoot- Sex Pistols  from GuidoMista
                Trigger - Turn on Stand Shoot Return Sex Pistols <gen>
                Trigger - Turn off Stand Shoot Sex Pistols <gen>

Code:
Stand Shoot Return Sex Pistols
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Return- Sex Pistols 
    Actions
        Unit - Move LoadedSexPistol instantly to (Center of Sex Pistols loaded <gen>)
        Unit - Change ownership of LoadedSexPistol to Player 12 (Brown) and Change color
        Unit Group - Add GuidoMista to (Units currently selected by (Owner of GuidoMista))
        Unit - Add Stand Shoot- Sex Pistols  to GuidoMista
        Trigger - Turn on Stand Shoot Sex Pistols <gen>
        Trigger - Turn off Stand Shoot Return Sex Pistols <gen>

Also, I need some help with the abilities themselves, (I used channeling as the base) the hero ability shows up green when selecting it after a level-up, and when using it it does not add the stunned (pause) buff (2 seconds).
 

perkeyone

something clever
Reaction score
71
instead of
"unit group - add unit to units currently selected by player"
do
"selection - select unit for player"
 

yunusowic

New Member
Reaction score
7
1st Trigger : Change the event to Elapsed game time is 0.01 seconds.

2nd Trigger : What doesnt work here? Maybe the condition is false.

3rd Trigger :
Trigger:
  • Set LoadedSexPistol = (Random unit from (Last created unit group))


Last created unit group refers to the Last units you created with Unit - Create action.

4th Trigger : In 3rd trigger you turn on this trigger then turn it off again.

Trigger:
  • Unit - A unit Begins casting an ability


istead of this use
Trigger:
  • Unit - A unit Starts the effect of an ability
(if they're not channeling abilities)

Trigger:
  • Unit Group - Add (Last created unit) to (Units currently selected by Player 1 (Red))


what does this suppose to do? Are you trying to select the unit for the player? Then use

Trigger:
  • Selection - Select unit for player
 

ninjaalamode

New Member
Reaction score
0
Thanks for the help, but, I realized the triggers I was using weren't exactly what I wanted for the hero I was making, and decided to make new ones, unfortunately, it's not working either, at all.

I'm using a spell book based ability to bring up the spell that is used in this trigger.

Code:
Sex Pistol 1
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Sex Pistol 1 
    Actions
        Unit - Change ownership of SexPistols[1] to (Owner of GuidoMista) and Change color
        Unit - Move SexPistols[1] instantly to (Position of (Target unit of ability being cast))
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 10.00 damage of attack type Spells and damage type Normal

It is supposed to do 10 damage to the targeted unit, and summon a unit by the target.
 

perkeyone

something clever
Reaction score
71
instead of move unit instantly..
why not create unit for owner of casting unit?
 

ninjaalamode

New Member
Reaction score
0
instead of move unit instantly..
why not create unit for owner of casting unit?
Well, it's the way I am doing it, the units are created at the beginning of the game when the hero is picked, and then are put in a region where they constantly switch in and out of when an ability is used.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top