A little Trigger help

irgan

New Member
Reaction score
3
I'm trying to get this trigger to work where if a unit comes within touching range of my dummy fireball (who is moving to a point), it explodes, and if NO unit comes withing touching range of it, when it gets to its designated spot, it explodes anyways :p Any help? Here's the trigger that i have so far...not very far into it. Kinda stuck

Trigger:
  • Fireball
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Unit - Create 1 Fireball Model for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set Fireball = (Last created unit)
      • Unit - Order (Last created unit) to Move To (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Trigger - Add to (This trigger) the event (Unit - A unit comes within 256.00 of Fireball)
          • Special Effect - Create a special effect at (Position of Fireball) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Unit - Remove Fireball from the game
        • Else - Actions


oh and yeah i know the special effect isnt explode like it should be, i just didnt feel like doing the details yet till i got the structure down :p
 

bajaist

Member
Reaction score
4
First use event A unit starts an efect of an ability.
I think you should add event to another trigger:
Trigger - Add to (Trigger2) the event (Unit - A unit comes within 256.00 of Fireball)
and then do whatever you want to.
 

ultimate11

Active Member
Reaction score
25
No WE in my face,hand written...sry for eventually mistake.It should work fine :d
You can edit some variable doing what u want or anything else if u know
It should work for every player (it`s MUI)
Trigger:
  • Fireball trigger 1
    • Events
      • Unit - A unit Start the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Set Caster_point[(player number(owner of (triggering unit)))] = (position of (triggering unit))
      • Set target_point[(player number(owner of (triggering unit)))] - (target point of ability being cast)
      • Unit - Create 1 dummy for Player (owner of (triggering unit)) at Caster_point[(player number(owner of (triggering unit)))] facing Default building facing degrees
      • Unit - Add ability (thunderclap[fake]) to (last created unit)
      • Unit - Issue order (last created unit) to Human thunderclap
      • Unit - Create 1 Fireball Model for Player (owner of (triggering unit)) at Caster_point[(player number(owner of (triggering unit)))] facing Default building facing degrees
      • Set Fireball[(player number(owner of (triggering unit)))] = (Last created unit)
      • Unit - Order (Last created unit) to Move To target_point[(player number(owner of (triggering unit)))]
      • Unit - Add unit (distance between Caster_point[(player number(owner of (triggering unit)))] and target_point[(player number(owner of (triggering unit)))]/(current movement speed of (last created unit)) expiration timer
      • Custom script: call RemoveLocation (udg_Caster_point)
      • Custom script: call RemoveLocation (udg_target_point)



Trigger:
  • Fireball trigger 2
    • Events
      • Time - Every 0.1 seconds of game
    • Conditions
    • Actions
      • For each integer A to (number of players in (All players) //u can add some conditions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fireball[integer A] = alive
        • Then - Actions
          • Set group = units in (300) range of Fireball[integer A] matching ((units is alive) and (owner of matching units is an enemy of owner of fireball[integer A]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - number of units in group greater or equal to 1
            • Then - Unit - explode unit
              • Unit - pick every unit in group
              • Unit - damage target dealing (dmg u want) to (picked unit)
          • Custom script: call DestroyGroup (udg_group)


Trigger:
  • Fireball trigger 3
    • Events
      • Unit - Generic unit dies
    • Conditions
      • Unit - Unit type of (triggering unit) = fireball
    • Actions
      • Set group = units in (300) range of triggering unit matching ((units is alive) and (owner of matching units is an enemy of owner of triggering unit
      • Unit - explode unit
      • Unit - pick every unit in group
      • Unit - damage target dealing (dmg u want) to (picked unit)
      • Custom script: call DestroyGroup (udg_group)


*bajaist 'Trigger - Add to (Trigger2) the event (Unit - A unit comes within 256.00 of Fireball)' i haven`t seen such a event in WE (it`s a specific event) mybe in WEunlimited.
 

irgan

New Member
Reaction score
3
Blasphemy!! You most certainly can use variables!!! :O and yeah, most of your handwritten stuff made sense and a few things didnt. oh and btw, for some reason i can't remove the 2 Point array variables. When i use the custom script it causes an error that says "Expected array index". What is that? Cant erase arrays or something?
 

NeuroToxin

New Member
Reaction score
46
Don't use Unit Comes WIthin Range, use this. Pick every unit within X of the dummy units location, if its equal to 0, do nothing (Not literally, do nothing is a waste of space) Else, explode him.
 

irgan

New Member
Reaction score
3
That's...not quiet what i was talking about. But thanks! Still having the problem with the first Fireball trigger with removing those variables
 
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