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).
 
instead of
"unit group - add unit to units currently selected by player"
do
"selection - select unit for player"
 
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
 
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.
 
instead of move unit instantly..
why not create unit for owner of casting unit?
 
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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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