| 02-08-2004, 10:57 PM | #1 |
Hi Im trying to make a standard melee map wich resets every 12 minutes. When it resets you get your 5 workers and main building back and you start again. Now since its my first map I have experienced problems with all my triggers (its not working pretty well hehe) Here ill describe how I build my scripts: Map Initialization: -All standard scripts except that Ive removed the winning conditions. -Countdown Timer: Start (Expiring Timer) as a repeating timer that will expire in 720.00 seconds. -Countdown Timer: Create a timer window for (Expiring Timer) with title Time Left -Countdown Timer: Show (Last Created Timer Window) for Player 1 (Red) -Countdown Timer: Show (Last Created Timer Window) for Player 2 (Blue) -Countdown Timer: Show (Last Created Timer Window) for Player 3 (Teal) -Countdown Timer: Show (Last Created Timer Window) for Player 4 (Purple) I encounter my first problem here. No timer is shown on screen... But the timer seems to work since I tried waiting and when the timer got to 0 the game crashed (this is the second problem) Timer Trigger Events -Time: Every 720.00 seconds of game time Actions -Unit Group: Remove all units of (Units In (Playable Map Area)) from (Units Owned By Player 1 (Red)) -Unit Group: Remove all units of (Units In (Playable Map Area)) from (Units Owned By Player 2 (Blue)) -Unit Group: Remove all units of (Units In (Playable Map Area)) from (Units Owned By Player 3 (Teal)) -Unit Group: Remove all units of (Units In (Playable Map Area)) from (Units Owned By Player 4 (Purple)) -Trigger: Run Melee Initialization <gen> (Checking Conditions) Why does the game crash? Doest anyone see the mistake in my trigger? Or maybe im totally off-track with this trigger... Help please. And why does the timer does'nt show?? Oh and by the way there are 2 things I dont know how to do. How do I reset the fog of war when the game restarts, and how do I reset the creep camps and item delay in shops? Thanks for taking time to read. |
| 02-08-2004, 11:22 PM | #2 |
ok first of all, your triggers were pretty far off track. its an easy solution tho, so i'll post the triggers here: timer create Events Time - Elapsed game time is 0.00 seconds Conditions Actions Countdown Timer - Start timervariable as a One-shot timer that will expire in 720.00 seconds Countdown Timer - Create a timer window for timervariable with title This is a Title ^^ The reason your timer creation wasnt working is because first of all, you need a variable that is of type "timer" and second, timer windows cannot be displayed at map initialization, you must wait at least 0.00 seconds. its just the way the game works. Third, you dont need "display timer window for player" because it displays to all players by default. the solution for the second trigger might be a little hard, but its a major shortcut from the other way you could do it: timer fire Events Time - arenatimer expires Conditions Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions) Loop - Actions Unit - Remove (Picked unit) from the game This trigger uses a loop, which is like a way of doing lots of things one after another. basicly, the first time it "loops", the "integer A" will be equal to 1, the second time it loops, "integer A" will be equal to 2, and so on. I used the "conversion - Convert player index to player" here, where you replace the number with "integer A" (its at the top of the list) and then you dont have to do this for each player. The really really big problem with your second trigger is that you were removing units from a group, which is more like a classification of units, you wernt actualy removing the units. Also, your event was "every 720 seconds", which is different than your timer. if you want something to happen every time the timer hits 0, you need to use "Time - Timer expires" event. if you need more help, post, ive got plenty of spare time today.... :/ |
| 02-08-2004, 11:28 PM | #3 |
wow, I thought u were a dead spirit Anarchy! Ive never seen u on the forums B4 Oh yes ur problem, the initalization was your main error yes. Ana'a solution should work fine. |
| 02-08-2004, 11:29 PM | #4 |
Thanks! By the way I was wondering, in the first line of trigger where I start the timer, what kind of variable is it? Im not very familiar with variables.. :bgrun: |
| 02-08-2004, 11:32 PM | #5 |
it should be like this: Timer (timer) anyways, yes hunter, i AM alive. |
| 02-08-2004, 11:41 PM | #6 | |||
Quote:
By looping do you mean everytime the timer gets to 0 its a loop where the integer A will change from 1 to 2, 2 to 3, on and on? If its so, why? if its not, what is it? Quote:
What is conversion - Convert player index to player? Quote:
What is the action?? Thanks for your time, I know Im pretty newb but we all start somewhere and Ive decided its tonight. By the way I managed to make the timer display wich made me pretty proud of hard work, thanks for your cooperation :D |
| 02-09-2004, 12:10 AM | #7 |
ok to explain a few things: A Loop is normaly instantaneous, unless you have wait actions in it, but basicly what it does, is: however many times its going to loop (ie, if its "from 1 to 12"), it will do all those actions inside it, and all at the same time. the action to pick for a loop is in "general" and its listed exactly as "For Each Integer A, Do Action" or, if you need multiple actions to happen, you can use "For Each Integer A, Do Multiple Actions" Conversion - Convert Player Index to Player is a function that allows you to use an integer (whole) number instead of selecting a player from the drop down list of players. This action is accessible in the "functions" drop down menu when you are being asked for what player to use. |
| 02-09-2004, 12:14 AM | #8 |
The loop function, its automatic or I have to set it up somewhere? Cause I used the search feature and couldnt find anything related to loop... Thanks for your support by the way, Im slowly getting a picture of triggering hehe 8)) |
