• 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.

[Trigger] Problem with random location region effects

Status
Not open for further replies.
Level 1
Joined
Jan 15, 2014
Messages
3
Hello! I am very new to this forum. Anyway I would love to get some help, I am starting to create some maps after a loooong break and atm I am really stuck at creating special effects at certain regions, have a trigger "harm or kill units inside that region" and then remove the effects and "harming trigger". This is what I have done so far, but I don't know how to kill all the fire effects and also the region which i move has not updated its location to the second trigger. Even with variables I couldnt make it work, because I couldnt refer to a variable that has no initial "region" value.. Any help is appreciated! Here follows my trigger:

Fire1
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Set fireactive1 = 1
Region - Center Fire1 <gen> on (Random point in (Playable map area))
Set fire1 = Fire1 <gen>
Cinematic - Ping minimap for (All players) at (Center of Fire1 <gen>) for 10.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100.00%)
Game - Display to (All players) for 15.00 seconds the text: A fire has started!...
Wait 2.00 seconds
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Special Effect - Create a special effect at (Random point in Fire1 <gen>) using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
Wait 3.00 seconds
Trigger - Run Killinfire <gen> (checking conditions)



Killinfire
Events
Time - Every 0.10 seconds of game time
Unit - A unit enters Fire1 <gen>
Conditions
fireactive1 Equal to 1
Actions
Unit - Set life of (Entering unit) to ((Life of (Entering unit)) - 2000.00)
 
Level 1
Joined
Jan 15, 2014
Messages
3
Thank you for your reply. I did check out the tutorial, and change the triggering unit. Still doesn't work though. And in the leaking tutorial they explain special effects leaking not moving regions and such!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Killinfire makes no sense... You either damage units that enter the region once or you periodically damage all units that match certain conditions that are inside the rect. You cannot really do both with the same trigger.

Trigger - Run Killinfire <gen> (checking conditions)
This probably does nothing seeing how event dependant the trigger actions are. Maybe you want to turn the trigger on instead (so that the events will fire the trigger instead of just running the actions once).
 
Level 1
Joined
Jan 15, 2014
Messages
3
Thank you for the response! Hmm, I realize the mistakes and leaks but I don't know how to fix them all. What I basically want to do is to create a random fire in any location, with special effects.

Then after a duration, maybe a minute I want to delete that fire.

While the fire is burning anyone entering should take damage... If anyone can help me and send me in the right direction or something I would be really grateful!

I am a beginner to this but I am really trying to learn. Browsed countless of pages on different forums but don't seem to find someone with this same problem..

edit: When I test the map, what happens is that the region is not "updated" in killfire. The special effects are spawned in the "moved - centered at random location" region correctly, but the event in killfire uses the initial location of the region. I can not refer to the updated region via variables..

Furthermore, to delete the special effects after a certain time I have absolutely no idea how to go about since I have so many special effects and last created special effect is only one.
 
This leaks.
(Random point in Fire1 <gen>)
And this leaks.
(Random point in (Playable map area))

You have to set those points into a variable then use the variable then destroy the location with custom script.

To make your triggers work you need 3 triggers and a unit group.
For one trigger use event unit enter region.
Add the triggering unit into the unit group.

For the next trigger use a unit leaves region.
Remove the triggering unit from the unit group

For the third trigger use a unit group loop to pick all units in that unit group and damage them.

To delete the special effects after a certain time you store all of them in a variable. Then you use that variable to destroy the special effect.

You should also check out my tutorial Things a GUIer Should Know. It will help you a lot with basic to advanced triggering.
 
Status
Not open for further replies.
Top