Item aura doesnt work

Prester

New Member
Hi

An Item is lying on the ground
A Hero picks it up
as long as its carried every 0.2 sec a random enemy in Range (512) of the Hero gets 50 dmg and small effect is created at the enemy to show who is hit.

But i dont get this working :-(

my problem is the event, i can either choose -a unit picks up item- which would be great cause i would have a "triggering unit" but now i can no longer choose -every 0.2 sec of the game- which i need to continue damaging enemys...

The best i managed is to damage ONE enemy right after picking it up -.-

Is there a way to trigger something every X secs not as event but as action (or maybe condition? sounds unrealistic) ?

this is my trigger so far

Trigger:
  • function Trig_Dmgaura_Conditions takes nothing returns boolean
    • if ( not ( IsItemOwned(gg_item_I006_0263) == true ) ) then
      • return false
    • endif
    • return true
    • endfunction
    • function Trig_Dmgaura_Func003Func002A takes nothing returns nothing
      • call AddSpecialEffectTargetUnitBJ( "overhead", GetEnumUnit(), "Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl" )
      • call UnitDamageTargetBJ( GetManipulatingUnit(), GetEnumUnit(), 50.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DEATH )
    • endfunction
    • function Trig_Dmgaura_Func003C takes nothing returns boolean
      • return true
    • endfunction
    • function Trig_Dmgaura_Actions takes nothing returns nothing
      • if ( Trig_Dmgaura_Func003C() ) then
        • call ForGroupBJ( GetRandomSubGroup(1, GetUnitsInRangeOfLocAll(512, GetUnitLoc(GetManipulatingUnit()))), function Trig_Dmgaura_Func003Func002A )
      • else
        • call DoNothing( )
      • endif
    • endfunction
    • //===========================================================================
    • function InitTrig_Dmgaura takes nothing returns nothing
      • set gg_trg_Dmgaura = CreateTrigger( )
      • call TriggerRegisterTimerEventPeriodic( gg_trg_Dmgaura, 0.20 )
      • call TriggerAddCondition( gg_trg_Dmgaura, Condition( function Trig_Dmgaura_Conditions ) )
      • call TriggerAddAction( gg_trg_Dmgaura, function Trig_Dmgaura_Actions )
    • endfunction


wtf ?
sorry somehow my trigger wasnt converted back :->
its totaly gui

To post a trigger i have to:
convert trigger to text
copy paste text here
set [wc3 ] and [/wc3 ] at end and beginning.
did i do something wrong ? -.-
not my day
 

jig7c

Stop reading me...-statement
1) to post a trigger, in its GUI form, just right click on the trigger, in the left column, and click on copy as text... then come to this forum, and paste it and put the
Trigger:
tags around it...

2) you trigger should look like this...in GUI

trigger
event
a unit acquires an item
conditions
item being manipulated equal to (your item)
actions
set Hero = (triggering unit)
trigger - turn on trigger1

trigger1
event
every .02 seconds of game time
conditions
Hero has item type of being manipulated equal to (your item) equal to true...?
actions
set point = position of Hero
set group = every enemy unit, not a building, within 512 of point
unit - damage random unit from group dealing 50 chaos damage
destroy group
destroy point

trigger2
event
a unit drops an item
conditions
item being manipulated equal to (your item)
actions
trigger - turn off trigger1
set Hero = no unit

-free handed-
 

Prester

New Member
i tried to make ur trigger
but because i m total nub i got stuck ;D
anyway here how far i got:

Trigger:
  • Trigger
    • events
      • unit - A unit aquires an item
    • conditions
      • (Item-type of (Item being manipulated)) equal to Ring der Regeneration
    • actions
      • Set Hero = (Triggering unit)
      • trigger - Turn on Trigger1 <gen>


Trigger:
  • Trigger1
    • events
      • time - Every 0.20 seconds of game time
    • conditions
      • (Hero has an item of type Ring der Regeneration) equal to True
    • actions
      • Set point = (Position of Hero)
      • Set group = (Units within 512.00 of point matching ((Matching unit) equal to (Targeted unit)))
      • unit - Cause Hero to damage (Random unit from group), dealing 50.00 damage of attack type Chaos and damage type death
      • specialeffect - Create a special effect attached to the overhead of (Random unit from group) using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl


Trigger:
  • Trigger2
    • events
      • unit - A unit loses an item
    • conditions
      • (Item-type of (Item being manipulated)) Gleich Ring der Regeneration
    • actions
      • trigger - Turn off Trigger1 <gen>
      • Set Hero = no unit


dammit, my editor is german so my text is totally messy in here :-(

it looks like : (trigger1)

Trigger:
  • Trigger1
    • Ereignisse
      • Zeit - Every 0.20 seconds of game time
    • Bedingungen
      • (Hero has an item of type Ring der Regeneration) Gleich True
    • Aktionen
      • Set point = (Position of Hero)
      • Set group = (Units within 512.00 of point matching ((Matching unit) Gleich (Targeted unit)))
      • Einheit - Cause Hero to damage (Random unit from group), dealing 50.00 damage of attack type Chaos and damage type Tod
      • Spezialeffekt - Create a special effect attached to the overhead of (Random unit from group) using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl

if i dont chance most of it into english :->
sorry

but i have some questions:
when setting the variables hero, point and group, are there variables arrays? and when yes what do i put in the index??

the line: set group = units within .... how can i choose enemy unit, not a building?? all i can choose from is: is a building, a hero, a peon, stunned ... where do i get the: ground, neutral, enemy ... from? which comparison?

and if i want to add an effect to the SAME unit from the group that is randomly picked, how do i do that ?

and why and how do you destroy unit and group? found nothing like destroy ... :-(

hope i dont get on ur nerves ;-)

but thx man i got the idea of ur trigger just cant figure out how to make it yet :-(
 

jig7c

Stop reading me...-statement
in your second trigger,

Set group = (Units within 512.00 of point matching ((Matching unit) equal to (Targeted unit))) needs to be changed to

Set group = (Units within 512.00 of point matching ((Matching unit) not equal to (building) and ((Owner of (matching unit) equal to enemy of (owner of (Hero)) and (matching unit.... etc...)

use Condition And Condition to specific your criteria

you can do this

set group = blah blah blah...
set unit = Random Unit from group
Unit - Cause Hero to damage unit, dealing 50 chaos damage
Special effect - Create a special effect attached to the overhead of unit using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
set unit = no unit
-use custom script, and type the following out, exactly-
call DestroyGroup (udg_group)
call RemoveLocation (udg_point)

the variable are not arrayed, there are tutorial on what the indexes do and what arrays do, fairly simple to use them...

i don't have WC editor on this computer, if not I would make them for you
you don't get on my nerves
 

jig7c

Stop reading me...-statement
it is not MUI, so to let you know

meaning, if two heroes get the same item, it'll probably bug!!!
 

HydraRancher

Truth begins in lies
To make it MUI, add it to a Unit Group, then refer to wether it is in the unit group every 0.2 seconds and a unit is in range.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    Make sure you keep checking out my news..
    +2
  • Jesus4Lyf Jesus4Lyf:
    Man, I made this account 15 years ago? Wild. :)
  • Ghan Ghan:
    Seeing J4L is definitely a blast from the past.
  • Jesus4Lyf Jesus4Lyf:
    Oh hey Ghan! Long time. :)
    +1
  • jonas jonas:
    J4L! What has happened in your life
  • Jesus4Lyf Jesus4Lyf:
    Hmm, how to summarize... Moved to the USA and got married. Became a professional software engineer and solution lead. Learning Godot for game dev. :)
  • jonas jonas:
    So you are pursuing game dev as a hobby? What industry is your dayjob in?
  • jonas jonas:
    FAANG?
  • Jesus4Lyf Jesus4Lyf:
    Not quite FAANG, less pay for a less hours/stress. Yeah, game dev as a hobby.
  • jonas jonas:
    makes sense. Do we have a hobby game dev subforum to showcase some work?
  • Blackveiled Blackveiled:
    Happy Thursday
    +1
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    TGIF!
  • The Helper The Helper:
    hey tom_mai please do not archive anymore news
  • Ghan Ghan:
    AMD Ryzen 7000 next week :D
    +1
  • The Helper The Helper:
    noice!
  • tom_mai78101 tom_mai78101:
    "hey tom_mai please do not archive anymore news" ----> Got it. What should we do with the "News Archive" subforum?
  • The Helper The Helper:
    I think leave it for real old news that cannot be sorted the reason we had it in the first place was a server issue that we do not have anymore. I don't want to get rid of the archive just not put anything in it for now until we figure it out more
  • The Helper The Helper:
    The side chat has nothing on the discord. it is not possible but the biggest thing on my wish list right now is a sidechat channel on the disord that hooks up to this...
  • Ghan Ghan:
    I've been selected for the Diablo IV beta.
    +1
  • Ghan Ghan:
    Woo!
    +1
  • The Helper The Helper:
    that is so cool
  • V-SNES V-SNES:
    Eh just noticed the new discord section on the side. Looks great!
    +1
  • Blackveiled Blackveiled:
    :( feels bad I can't ever get selected for any beta I sign up for. It's annoying as heck.
    +1

    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