- Joined
- Aug 31, 2018
- Messages
- 157
I want every 10 min of the game a meteor to land on you and spawn a unit.
Same as in Sunken City.
Same as in Sunken City.
60000 seconds
Yes, but the problem is that i don't know how to make the trigger... Also i never used Dummies before.Just make a periodic trigger that triggers every 600 seconds (or a repeating timer that expires in 600 seconds). Then make a special effect on the unit and use the Unit - Create Unit function. Alternatively you can make a dummy unit cast Inferno on the unit or something. It's not really that hard: just play around with the Editor!
call RemoveLocation(udg_ImpactPoint)
.It would be easier just to show me the triggers, but thank you for the answer ^_^Read these: Basics of Triggers and Variables
Then make a variable of type Unit named something like PlayerHero, or whatever. The name doesn't really matter, just use something that you know what it's meant for. You also need a second variable of type Point. Name it something like ImpactPoint.
Then you actually store your unit to the variable. It really depends on how your hero is created, but if it is already placed in the World Editor you can go to your Map Initialization trigger and put an action General - Set Variable. Then choose the variable you made and then select the unit you placed on the world.
Then try to make a trigger with an event: Time - Periodic Event (and put in the 600 seconds). Now you have to set the ImpactPoint variable. So use the Set Variable action again to set ImpactPoint = (Position of PlayerHero). This will store the position of the unit to the variable. Next add another action: Special Effect - Create Special Effect At Point. Put the ImpactPoint as the position of the special effect. Lastly, add the desired special effect, like Inferno from abilities category.
Now, if you are making it this way, without a dummy, you might want to wait before you create the unit. So put on General - Wait and choose the time it takes for the fireball of the Inferno to land.
Then use Unit - Create Units Facing Angle action and choose whatever you want, and put ImpactPoint as the location where the unit is created.
Now you have to put a custom script to remove the leak. You don't have to understand it fully, but basically it's just removing data you don't need or even can't use later, like the point stored into the ImpactPoint variable here. I think it's a good practice to start learning to remove the leaks right from the beginning so it becomes a habit faster and not something you'd have to learn later.
Anyway, now for the last line, put an action General - Custom Script and fill incall RemoveLocation(udg_ImpactPoint)
.
It would be easier just to show me the triggers, but thank you for the answer ^_^