HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Medium Trigger Problem

02-27-2005, 07:22 PM#1
Kalvorod
If you saw the other thread, and had no clue, maybe you'll be able to help me on this one (last one btw).

OK, I have a building cast an ability called "Halt Attack".

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Ability being cast) Equal to Type 8 Halt Attack
        ((Triggering unit) is A structure) Equal to True
    Then - Actions
        Trigger - Turn on Set Attacks <gen>
        Unit - Remove Type 8 Halt Attack from AttackDefend[1]
    Else - Actions

Ok, so the ability gets removed, only...even though the 'Set Attacks' trigger says it should go off every .1 seconds...

Code:
Events
    Time - Every 0.10 seconds of game time

Nothing happens. This trigger is humongus, so I'm not going to post it here.

Basically what it does is gives a whole bunch of units some abilities, then turns itself off. Unfortunatly, when I cast the "halt Attack" spell which should run this, nothing happends.

Any ideas?
02-27-2005, 08:00 PM#2
Kamux
What is the event of your first trigger?? The actions seem to be correct.
02-27-2005, 09:38 PM#3
Raptor--
i really can't figure out what you're even trying to do from the snipet you gave... :S

just that some trigger is being ran every 0.10 game seconds and its not working...

you're better off giving the Set Attacks implementation
02-27-2005, 10:20 PM#4
Kalvorod
Quote:
Originally Posted by Raptor--
you're better off giving the Set Attacks implementation


Um.. I don't understand.

What happens is this:

Unit casts an ability.
The ability is = Halt Attack
Start "Set Attacks"(which goes at exactly .1 seconds, then shuts off)
Remove ability = Halt Attack


So what should happen is
I cast a spell
That spell is changed into several other spells, basically.
02-27-2005, 10:28 PM#5
Azhag
Quote:
((Triggering unit) is A structure) Equal to True

Try switching the triggering unit, to casting unit. From what I have seen on the trigger itself, is that there is no unit triggering the trigger in the first place.
02-28-2005, 06:48 AM#6
Raptor--
Quote:
Originally Posted by Kalvorod
Um.. I don't understand.

implementation = the actual trigger
because i can't see anything from the snippet you have posted, just from that i can say it looks alright, but obviously its not if its not working so i need more information to assess the problem


and @Azhag, triggering unit is pretty much a generic form of all the event responses (or at least it catches a lot of them), it will work for casting unit in this case afaik
02-28-2005, 09:12 AM#7
Bulletcatcher
While it might not work, you could try not creating any events for the every .1 second trigger, and have it enabled from the start. When the halt attack trigger runs, just add the 'Every .1 seconds of game time' event to the other trigger.

If this also does not work, there's probably something wrong with the second trigger.
02-28-2005, 01:32 PM#8
Kalvorod
OK, well I don't see how that would work, being that I only want the event to fire once, not every .1 seconds. That's just a clever way to start a trigger from another.

I changed the "Turn On" trigger to a "Run: Ignoring Conditions", then I placed that at the end of the trigger. I probobly did a whole bunch more random things, that would seemingly not help either, but it ended up working, so I'm content. :)
02-28-2005, 10:48 PM#9
Raptor--
Quote:
Originally Posted by Kalvorod
OK, well I don't see how that would work, being that I only want the event to fire once, not every .1 seconds. That's just a clever way to start a trigger from another.

actually thats the more starcraft way... using the built in functions to fire a trigger is actually the more clever way -- at least its more elegant and you don't have a wierd repedative trigger running for no reason...
02-28-2005, 11:24 PM#10
Yoz
Code:
Events
     Unit - A unit begins casting an ability
Conditions
     ((Ability being cast) equal to Type 8 Halt Attack) and (((Casting unit) is a structure) Equal to True
Actions
     Trigger - Turn on Set Attacks <gen>
     Unit - Remove Type 8 Halt Attack from AttackDefend[1]
This should work
02-28-2005, 11:45 PM#11
Raptor--
Quote:
Originally Posted by Yoz
Code:
Events
     Unit - A unit begins casting an ability
Conditions
     ((Ability being cast) equal to Type 8 Halt Attack) and (((Casting unit) is a structure) Equal to True
Actions
     Trigger - Turn on Set Attacks <gen>
     Unit - Remove Type 8 Halt Attack from AttackDefend[1]
This should work


what? you just recited his exact trigger back to him except put the AND in one line...

i know ur gonna say u changed triggering unit to casting unit, but like i've said a million times before, triggering unit will catch the casting unit event, its just a generic form of it
of course i'd use casting unit as well, but still it won't make a difference afaik
03-01-2005, 07:44 PM#12
Vexorian
Triggering Unit is much better than casting unit, it survives waits.

And conditions are already in AND form by default