| 03-12-2005, 08:19 PM | #1 |
Hello, I'm making a map called CounterStrike. Well, i made a region on where the unit has to step and i would like to make a timer start, and when the timer stops, then a bomb would be planted. Could someone tell me how to do it? Like tell me what are the events/conditions/actions. Thank You j0sh4tran |
| 03-12-2005, 08:34 PM | #2 |
Guest | I think I can help a little on this, im not that good on triggers but im learning. The condition should be 'comparison of item in inventory equal to C4' or something like that. Event should be 'unit enters region equal to Terrorist' or something. Action for planting should be 'Wait (the time you want)' and then im out of ideas. Hope it helped a little at least :p I dont remember all those damn triggers since I havent used em much yet. If you want I could go and check up on it but im not sure if I will find it. And im on a 56K at the moment so I cant be on for too long. |
| 03-12-2005, 08:43 PM | #3 | |
Guest | Quote:
Event - generic unit enters region Condition - boolean check unit has item = bomb action - set variable"unitwithbomb" = triggering unit Action - Countdown timer "you create name" for the duration of how ever long action - unit pause unit if/then/else multiple functions if = unitwithbomb dies action - countdown timer - kill timer then create another trigger with the event, timer expires with the timer of the countdown condition - nothing action - unpause unitwithbomb action - unit - create 1bomb unit at the rect where the unit had to be for the countdown to take place action - create whatever soundeffects/specialeffects you want for the CS bomb of gg action - wait 15 seconds action - camera - pan camera to location of bomb rect action - unit - destroy last created unit (the bomb) action - special effect - create explosion at center of bombrect I didnt look in the editor, so I might have gotten some of the names wrong, but that might be what you want. |
| 03-13-2005, 12:08 AM | #4 |
I created a timer window also. The time in it wouldnt move and i counted 8 seconds out myself. And my unit wouldnt unpause or the bomb wouldnt be planted. what could be wrong?? |
| 03-13-2005, 12:19 AM | #5 | |
Guest | Quote:
Right click the name of your triggers and select copy as text. Paste them here so that we can look at them and see what might be wrong. |
| 03-13-2005, 12:23 AM | #6 |
Planting The Bomb A Events Unit - A unit enters BombSite A <gen> Conditions (Item carried by Paladin 0027 <gen> in slot 1) Equal to Bomb 0019 <gen> Actions Countdown Timer - Start TimerForBomb as a One-shot timer that will expire in 8.00 seconds Countdown Timer - Create a timer window for TimerForBomb with title Bomb Planting Unit - Pause (Entering unit) If (((Triggering unit) is dead) Equal to True) then do (Countdown Timer - Destroy (Last created timer window)) else do (Countdown Timer - Pause (Last started timer)) And the second part is - Bomb Dropping Events Time - TimerForBomb expires Conditions Actions Unit - Unpause (Triggering unit) Unit - Create 1 Bomb for Neutral Passive at (Center of BombSite A <gen>) facing 3.00 degrees Wait 30.00 seconds Camera - Pan camera for Player 1 (Red) to (Center of BombSite A <gen>) over 5.00 seconds Unit - Kill (Last created unit) Special Effect - Create a special effect at (Center of BombSite A <gen>) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl Unit Group - Pick every unit in (Units in Bomb Killer A <gen>) and do (Unit - Kill (Entering unit)) |
| 03-13-2005, 01:06 AM | #7 |
I'm not exactly sure how you want to go about it exactly, but this is how I would do it. Code:
Trigger 1 Event Unit Enters Bombsite_A <gen> Conditions Entering Unit has Bomb[[color=red]use Item of Type[/color]] Actions Set BombHolder_A = Entering Unit Start BombTime as a one-shot timer that will expire in 8 seconds. Create a Timer Window for BombTime with the title Bomb Planting Gets everything working right. I didn't pause the unit because if the player is about to die, I think the unit should have freedom of mobility. But it's up to you. If not, at the end of the trigger make the action: Pause BombHolder_A It's your choice. Code:
Trigger 2
Event
Unit Leaves Bombsite_A <gen>
Unit Dies
Conditions
Or
Leaving Unit = BombHolder_A
Dying Unit = Bombholder_A
Actions
Pause BombTime
Destroy Timer Window for BombTime
Set BombHolder_A = No unitThis is so that if the unit dies or leaves the Bombsite, the timer stops. And if the unit reenters the region, it restarts. Also, make sure that in the Object Editor, that you check the option for the bomb to drop from the holder when the holder dies. So that someone else can pick of the bomb and get the timer going. Code:
Trigger 3 Event BombTime expires Conditions Actions Destroy Timer Window for BombTime Remove Bomb from BombHolder_A Set BombHolder_A = No unit Unit create 1 Bomb for Nuetral Passive at Center of BombSite_A facing 3.00 degrees. Set BombUnit = (Last Created Unit) wait 30.00 seconds Camera - Pan camera for Player 1 (Red) to (Center of BombSite A <gen>) over 5.00 seconds Unit - Kill (BombUnit) Special Effect - Create a special effect at (Center of BombSite A <gen>) using Abilities\Spells\Human\ThunderClap\ThunderClapCast er.mdl Unit Group - Pick every unit in (Units in BombKill_A <gen>) and do (Unit - Kill (Picked Unit)) Now, the ending to that is like yours, except I fixed a few things to how they should actually be to work. And to make things a bit better. Now the BombUnit and BombHolder_A are unit variables. Just incase you were wondering. If you make those three triggers like I said, you should have no problem with your bomb event. Edit: Whoops sorry, forgot that if you want to pause the unit during the countdown timer of the bomb, you would instert the line: Code:
Unpause BombHolder_A Right above the setting BombHolder_A = No Unit in trigger 3. |
| 03-13-2005, 02:51 AM | #8 |
I dont really understand conditions. Can you tell me step by step on what to do on each trigger? |
| 03-13-2005, 02:17 PM | #9 |
Well, okay. In Trigger 1, I know that you know what to do for the events. For the condition, you go to the add condition button, click it, then you go to Boolean -- Then you go to Hero Has Item of Type -- Then you go to Has Item Type[Change Tome of Experience to Bomb] -- Then you go to Equals -- Then you go to True And that is how you do the condition in Trigger 1. Now create a variable. Make the variable type unit. And name this variable BombHolder_A, or something of equivalence. And then you go to Trigger one, and make a new action. Go to the General Tab, and then you go to Set Variable -- Then you change the <Variable> to BombHolder_A -- then you go to Equals Entering Unit And that's how you set that variable. I can see from your previous posts you know what to do next. In Trigger 2, however, the events are pretty straightforward so I'm not going to explain them. I can see where you might have a little difficulty with the condition however. Create a new condition for Trigger 2, and make it 'Or - Multiple Functions'. This is the last condition on the list, so scroll all the way down. Then you have setup the Or conditions. This means that the conditions under the Or, only one of them has to be true in order for the trigger to be executed. Now, for the following conditions are Unit Comparison conditions. Scroll down to the Unit Comparison condition, and make it as the Trigger 2 from my previous post. Also, I think the Actions are straightforward as welll so I'll move on to Trigger 3(Oh, the 'Pause BombTime' is under Countdown Timer, and is Pausing the Timer). Trigger 3, again is mostly exactly what your trigger was. Just with a few things changed in order to work. You should be able to figure it out. |
| 03-13-2005, 05:44 PM | #10 |
Wow!!! Thanks TheNyne! It works now, i also have added a countdown timer for how long until it will explode =D. Thank you very much |
