Trigger not working

smileyguyx

Member
Reaction score
1
Trying to make a trigger so when a specific unit (randomly picked from a group and spawned) dies it will give a specific effect
i tried this trigger but it doesn't work:
Trigger:
  • Events
    • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to EXPLOSION Power Up
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Add Explosion to Dodger 0003 <gen>
      • Unit - Order Dodger 0003 <gen> to Human Blood Mage - Flame Strike TempPoint
      • Unit - Remove Explosion from Dodger 0003 <gen>
 
base your abilities off the spawn hydra ability, which is casted on death
make a few different abilities if you want to have multiple affects
then
Trigger:
  • Special Death
    • Events
      • A unit casts an ability
    • Conditions
      • Ability cast is equal to (your abil)
    • Actions
      • set Temp_Point[1] = Position of casting unit
      • Unit - Create 1 Dummy Unit at Temp_Point[1] for owner of casting unit facing default building facing degrees (dummy unit should be one that u make that is invulnerable and has a blank model, for a blank model make a .txt file, erase the txt and put mdx, then import it into your map)
      • Unit - Add an expiration timer to Last created unit for 5.0 seconds
      • Unit - Add (Ability you are casting) to last created unit
      • Unit - Order last created unit to (Order String) at position Temp_Point
      • Custom Script: call RemoveLocation(udg_Temp_Point)
 
the spawn hydra skill only has 2 data slots-number of units spawned and unit type...
how do you add extra datas to it, or how do you base it off the "spawn hydra" skill?
 
you remove the units that it creates, and just create a shell of a spell out of it, then you can create as many copies as you want and differentiate between them when they are casted... get it?
 
so i use the spell as a trigger to use a different spell?
I can't find exact matches so is this right:
Trigger:
  • Events
    • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Spell 1
    • Actions
      • Set TempPoint = (Position of (Casting unit))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Explosion to (Last created unit)
      • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)

Also the spell "explosion" is based of kael's flame strike is that casing problems?
 
All you have to do is create a dummy unit with Locust and the Flame Strike model. Put that unit into the Spawn Hydra ability and add the ability to the powerup. When the powerup dies, it should create one of the dummy units at its position, which will then play the Flame Strike explosion animation.
 
GFreak45, i tried your trigger (using what i believe to be the most similar options available) but i still cant get it to work (to have it so when the unit dies the effect happens) though it seems to have worked very rarely
KaerfNomekop what do you mean by "locust"? is it a skill? a model?
ive attatched my map so please can you fix it (anyone..?)
 

Attachments

  • Dodgeball.w3x
    48.1 KB · Views: 239
locust is the ability that the "locusts" from locust swarm have, it is an ability that renders the unit invulnerable and unclickable
 
You seem to have misunderstood. Spawn Hydra is a passive ability, meaning that the ability is never "cast". What it does is that it spawns a unit, so there was no need to create another unit in the trigger either. My suggestion was that you add the Locust ability to the spawned unit-type, so that it looks just like an effect.

Here's the updated version. I just deleted some dummies, changed a bit of the abilities and the triggers in the Activate Spells category. Everything else is untouched.
 

Attachments

  • Dodgeball 2.w3x
    47.9 KB · Views: 242
Trying to make a trigger so when a specific unit (randomly picked from a group and spawned) dies it will give a specific effect
i tried this trigger but it doesn't work:
Trigger:
  • Events
    • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to EXPLOSION Power Up
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Add Explosion to Dodger 0003 <gen>
      • Unit - Order Dodger 0003 <gen> to Human Blood Mage - Flame Strike TempPoint
      • Unit - Remove Explosion from Dodger 0003 <gen>

If you only need the effect, just use special effects.
Trigger:
  • Events
    • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to EXPLOSION Power Up
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempPoint)


If you need an actual ability to be cast, you better use a dummy unit. Your trigger may not be functional due to several reasons like: Dodger 0003 is out of the range, doesn't have enough mana due to other casts or it's initial value and so on. Also, you must make sure that no trigger gives an immediate order to the dummy as it enters the region around the dying unit.

Trigger:
  • Events
    • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to EXPLOSION Power Up
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for Player ?? at TempPoint facing Default building facing degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add a 4.00 second Generic expiration timer to TempUnit
      • Unit - Add Flame Strike to TempUnit
      • Unit - Order TempUnit to Human Blood Mage - Flame Strike TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)


Map with the trigger and a sample Dummy unit.
View attachment DummyUnit.w3x
 
damn you have a real habit of posting on threads that were solved with the same solution or a worse one... the current one uses the hydra spawn baby hydras ability which is fired on death, and instead it summons a dummy unit... your trigger just skips the ability completely and goes straight into coding it
 
… (randomly picked from a group and spawned)

Actually, I don’t quite get this part and thus I didn’t include anything in the code for it. In your initial code, you seem to use a condition for unit-type, so any unit that is “EXPLOSION Power Up” will produce the effects. If you need the effect to have randomness, just add some simple –if- statement.

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If – Conditions
    • (Random integer number between 1 and 100) Greater than 80
      • Then – Actions
    • (Insert code here)
      • Else - Actions


damn you have a real habit of posting on threads that were solved with the same solution or a worse one... the current one uses the hydra spawn baby hydras ability which is fired on death, and instead it summons a dummy unit... your trigger just skips the ability completely and goes straight into coding it

Actually, skipping the ability and go straight into coding was my exact intention. I don’t see a reason for using that extra ability. If the solution offered by me is worse, please elaborate, don’t assume it’s obvious.

PS. Stalking my posts and trying to get back for being “told”, won’t help anyone. You only perpetuate what caused this in the first place and cause confusion to new users trying to get their questions answered.
 
you did not read the full thread, the randomness is in the ability he adds to the dying unit, he can have as many copies of that ability as he wants and just add them randomly and it will work, your method was much more inefficient

PS. stalking your posts implies i havent checked every single post in the last few months, i work on the computer so i can multitask and browse the forum when i want, just because i call you on doing the same exact thing you accused me of doing when i plainly wasnt doing it
 
but it does require extra actions that arent needed and the trigger has to fire off every death and check the conditions, making it less efficient than using a simple ability, and a spawned unit event
 
He will need to pick a random unit first, which requires forming a group(which should be avoided as much as possible, especially in GUI). Then add the ability to that unit and it still requires a trigger to detect if the dying unit has the ability or a unit has spawned a summoned unit(the unit spawned by the ability in question).

All these against an % chance integer condition, to a trigger that will most likely run in his map anyway.

The only reason to get into all that, is to use the ability as a flag at the creation of the unit for whatever reason and still...He can use a variable/add classification/manipulate custom value condition, to avoid the mess and extra burden and still avoid forming a group.
 
what group are you talking about? there were no groups needed period for what i suggested
you keep confirming my point over and over that you did not actually read the thread, the random ability is added when the unit joins the map, the ability will create the dummy unit when the owner dies automatically, it has an automatic expiration timer built into the ability, i see no reason for a group
 
Trying to make a trigger so when a specific unit (randomly picked from a group and spawned) dies it will give a specific effect
@XeRo13G: There is no picking of a random unit. All he does is create Unit-type[(Random integer)], giving him one of (currently) 3 unit-types to be spawned. The simple step of downloading the map and opening up the trigger editor tells you this. Also, the special effect would give more trouble as the effect intended will not play if destroyed immediately. The ability makes it much easier as the effect is created instantly upon death of that specific unit-type.
 
I saw the map just fine. That's why I've posted the code, including the dummy unit.

If he needs an effect, he should simply use an effect.
If he needs an ability, he should use that ability.

Using longer or split between triggers code(Manipulate created unit and then again upon death) and the burden of an extra ability(which needs to be preloaded to avoid lag spikes), is sloppy coding and should be avoided unless absolutely necessary.

The point here, is to provide aid to those who post asking, not make your solution -win-.
Please take the time to consider before posting, else you might end up causing confusion to new users who are not yet able to floccinaucinihilipilificate.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3
  • The Helper The Helper:
    New forum coming soon going to be for my friend Saylor who is blind and he is doing motivational speaking and has an internet radio show and podcast. I am going to put a forum to promote him and other inspirational speaker stuff going to have some good stuff in it.
  • The Helper The Helper:
    his audio only music mix
  • The Helper The Helper:
    it just makes sense right?

      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