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.

      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