trigger help

deutschephar

New Member
Reaction score
1
hi!

this is my first post, though i lurked forum a while now.

i'm trying to 'patch' wc3-tft by making a map-pack with some abilites/spells/units changes (mostly for personal use in lan parties).

for example, i tried to make every channeling ultimate to last at least 5 seconds, interrupted or not, in a following way:
1. hero cast fake spell. timer starts
2. dummy casts real spell
3. spell is interrupted.
a) if timer is expired (5 sec) nothing happens
b) if timer is not expired, spell is continually casted by dummy till 5 sec

this works well for all channeling spells, with two exceptions:

1. earthquake - despite code being identical to others, i've managed this one to either not work at all, exit to desktop or work for 5 seconds regardless of interruption :banghead:

2. big bad voodoo - spell works correctly, except when interrupted during first 5 sec, shadow hunter gets under its influence for the remaining time (until 5 sec expires)

i would greatly appreciate suggestions or any other help. btw, my coding probably sucks to great extent, i'm aware of it :(

i've attached screenshot of defective earthquake trigger(s), as well as a test map

thanks in advance!
 

Attachments

  • earthquake-trigger.jpg
    earthquake-trigger.jpg
    175.2 KB · Views: 107
  • (4)TwistedMeadows 0.98g tmp.w3x
    267.4 KB · Views: 117

Laiev

Hey Listen!!
Reaction score
188
Hey, welcome to the forum :D

Well lets see...... I don't test the map but reading what you say...

You try just to remove all the triggers with stop casting ability?

So you cast if, if you die, the spell still running util it end, is like what you want, if you die, the 'dummy' will continue to cast...


No?

EDIT: i'm reading your triggers, and i found some problems.....

Wait = remove it, just use it if you wanna bug triggers in your map
Do Nothing = remove it, this just DO NOTHING, so don't need to say to map to do nothing with a line, you can say to map do nothing whitout any line

Also you don't remove any variable...

UltiPosition = unremoved variable

Trigger:
  • Custom Script: Call RemoveLocation (udg_UltiPosition)


and you don't set expiration time to the created dummy after EarthTimeExpire equal to True
 

deutschephar

New Member
Reaction score
1
thanks for the quick reply!

Hey, welcome to the forum :D

Well lets see...... I don't test the map but reading what you say...

You try just to remove all the triggers with stop casting ability?

So you cast if, if you die, the spell still running util it end, is like what you want, if you die, the 'dummy' will continue to cast...


No?

no, when spell is casted, timer is started. if spell is interrupted (hero dies, is bolted, anything), it continues until dummy is removed (at 5 seconds), not the full duration. if spell is NOT interrupted during initial 5 sec, another dummy recasts the spell, for (full duration - 5 sec), and is removed when spell is interrupted (i remove dummy there, in earth2 trigger)

basically i've tried to have guaranteed duration of 5 sec for channels, regardless of interruption.

i suspect that trigger itself is correct (even if bad written), and that problem is related to "STATS - EFFECT" or "STATS - BUFFS" fields in "Earthquake (fake)" spell (changing fields makes spell not function in different manner), that's why i attached map


EDIT: i'm reading your triggers, and i found some problems.....

Wait = remove it, just use it if you wanna bug triggers in your map
Do Nothing = remove it, this just DO NOTHING, so don't need to say to map to do nothing with a line, you can say to map do nothing whitout any line

Also you don't remove any variable...

UltiPosition = unremoved variable

Trigger:
  • Custom Script: Call RemoveLocation (udg_UltiPosition)


and you don't set expiration time to the created dummy after EarthTimeExpire equal to True

thanks for the info, i'll leave out DO NOTHING in the future.

i'm not sure about rest of, you suggest that i remove UltiPosition or not?

EarthTimerExpired i need for checking if 5 sec guaranteed period is over or not. depending of it, dummy recast spell or not. it is reseted later in earth2 or earth3 trigger (those two conclude casting)

how can i avoid 'wait', and measure 5 sec?
 

Laiev

Hey Listen!!
Reaction score
188
hmm, now i understand..

Well, to check if you reach 5 seconds, create a periodic trigger which check every sec if unit is alive.... if is died, set SOMEVALUE to SOMEVALUE + 1 and in the same trigger, check if the SOMEVALUE greater or equal to 5 and create dummy etc..

Also you NEED to remove that variable location

EDIT: now i see, don't use Begins casting an ability and change to starts effect of an ability

Why?
Sometimes it bug

EDIT [2]: i will check the map and what happen in game

EDIT [3]: ya, is what I say, use a trigger which check every second if TimerExpire = Falso then set VALUE to VALUE + 1 and after when VALUE equal to or greater then 5 remove unit and set the others variables to false, and.. you don't need to null unit variable
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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