• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Couple Trigger Questions

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2009
Messages
1,067
Okay, first of all, I have a trigger in my map that activates a fog effect.

What is that considered? Special effect? Or what? For Variable purposes.

I don't get it since I didn't make it. But it does what I want it to do, except that it's a permanent effect after I activate it (Step on the appropriate rect). It's there for when you enter the castle, but I want it to go away upon exiting. I think an if/then/else statement? IDK. I'm too tired to think right. Point is, I don't know how to make it do what I want. Here's the trigger atm:

  • Darkness
    • Events
      • Unit - A unit enters Gate Castle Open <gen>
    • Conditions
    • Actions
      • Environment - Set fog to style Linear, z-start 700.00, z-end 5000.00, density 0.05 and color (77.00%, 77.00%, 51.00%)
That's the first.

The second question is, how do I make a trigger so that when a unit (Hero, if it helps) touches (Collides with?) a doodad (Treasure Chest), that it plays the appropriate animation (Morph), and gives a certain item. Then it disappears (So, I'd guess Death)? I can only figure out parts of it, but not all of it.

Thanks for reading. Ofc, I abide by my signature!

Furthermore, if I had a good Triggerer for my Campaign (or just the Demo) I wouldn't be in this situation! D:
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
This will make the fog go away:
  • Environment - Reset fog to default values
Just use Unit enters region to trigger it.

I don't think there's a variable type for fog.

For the second thing, you can place a dummy unit at the position of the doodad an use this:

  • Untitled Trigger 021
    • Events
      • Unit - A unit comes within 256.00 of *dummy*
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Animation - Play *doodad* morph animation
      • Hero - Create Tome of Experience and give it to (Triggering unit) // Create the item for the unit that comes close to the dummy
      • Wait 2.00 seconds // You can try to set this so that the animation completes
      • Unit - Remove *dummy* from the game
      • Destructible - Remove *doodad*
EDIT: Slow.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
OMG.... Maker...

That's what lack of sleep does to me, -.-

I didn't even THINK to check if there was such an action.

So, I either gotta do the dummy unit or the region after all. Wasn't sure if there was a simpler way or doing so. Thanks, guys. Abiding my signature.

EDIT: Maker, it's not a destructible so that command won't remove it. I couldn't find any way to remove a doodad, either. Will I have to make it a destructible for this to work?
 
Last edited:
Level 12
Joined
Jan 30, 2009
Messages
1,067
Bump for the above post's Edit.

The proposed fix by Maker doesn't work. The Chest doesn't get destroyed. I'm assuming cause it's not a Destructible?

Here's what I have:

  • Castle Key
    • Events
      • Unit - A unit enters TC Castle Key <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to (==) True
    • Actions
      • Animation - Play the morph animation for all doodads of type Treasure Chest within TC Castle Key <gen>
      • Hero - Create Key and give it to (Entering unit)
      • Wait 2.00 seconds
      • Destructible - Remove (Random destructible in TC Castle Key <gen>)
Am I going to have to edit the chest to be a Destructible that's not attackable (Which I'm not sure how to do, Locust?) in order for this to work?
 
Bump for the above post's Edit.

The proposed fix by Maker doesn't work. The Chest doesn't get destroyed. I'm assuming cause it's not a Destructible?

Here's what I have:

  • Castle Key
    • Events
      • Unit - A unit enters TC Castle Key <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to (==) True
    • Actions
      • Animation - Play the morph animation for all doodads of type Treasure Chest within TC Castle Key <gen>
      • Hero - Create Key and give it to (Entering unit)
      • Wait 2.00 seconds
      • Destructible - Remove (Random destructible in TC Castle Key <gen>)
Am I going to have to edit the chest to be a Destructible that's not attackable (Which I'm not sure how to do, Locust?) in order for this to work?

so you mean the chest is a doodad?

for the unattackable, change the target type to maybe tree or something to make it not attackable...
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Alright, thanks, mate.

EDIT: Problem still exists. In a different fashion.

The model I'm using the the chest isn't able to be attached to a Destructible. Somehow. o_O

I'll try and come up with a workaround, though. If possible, some ideas would be nice. :)

EDIT2: Well, now all I need to do is find some way to remove doodads from the region it is in, and all's well. I guess.... Or even just to remove the pathing of it after the fact. To do this, I think I'd need a dummy unit, though, confirmation?

Cause now I have it disappear from sight through it's death animation. But...it's still there. :(
 
Last edited:
you cannot attach the chest model into a doodad? ur confusing me, coz you said that the chest was a doodad and then now you cant attach the model into a doodad? or are you talking of destructable, please dont mix doodad with destructable coz they work differently...

I think its a destructable coz there are no in-game functions to affect doodads... anyway there is a function to kill destructables... and ofc, disable the trigger at the first line of action...
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Well.

It was a typo, xD Fixed, btw.

I can't attach it to a destructible, it gives me the nasty box and can't read the model file for some reason. When I stick it on a doodad it is fine, though.

The next thing I'm thinking though is... remove the pathing on the chest itself, and use a dummy unit that has a pathing and just do it that way. I'm guessing that would work, cause the chest itself disappears, but the pathing is still there (This is after death animation).
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Why not import the doodad model over an existing destructible?
I just set the underground tree wall's model file to Brazier Glowing <base>. It also worked for every other doodad model I put on it. Just make sure that you set Art -> Model File -> Variations to 1. It won't work otherwise.

Note that I could only get it to work with tree walls. The barrels definately don't work.

If you're concerned about it being destroyed, just do this under your init trigger (or w/e is appropriate):
Destructible -> Make (Your Destructible) vulnerable/invulnerable.
And as Adiktuz mentioned, you can remove and/or kill destructibles via triggers.

//\\oo//\\
 
Status
Not open for further replies.
Top