| 02-02-2014, 05:29 AM | #1 |
Hello , i'm new to world edit ( have a little experience though ) I can't complete my map because I don't know the triggers for making someone out of 10 people the killer , its like in this sequence = the game starts , the game randomly picks a killer , I know this question is kinda nooby but please tell me the right triggers so i can finish my map |
| 02-04-2014, 08:55 AM | #2 |
Hi J3eastmaster! Realising it via the GUI (=Graphical User Interface) instead of JASS (=Just Another Scripting Syntax?) is easier when you havent that much experience. Let me show you a way for GUI where 1 out of 10 Players gets randomly chosen at map init. Go to the Trigger Editor. In the menubar there should be an icon with a yellow "X", click on it! This opens the Editor for global variables. Now - in this editor window - again, click on the green "X" to create a new global var. We want to use a boolean array, so: 1. name the var sth like "gBolA_Player" 2. select the var type "Boolean" 3. activate the check mark to make the global var an array Apply changes by clicking OK. A simple Trigger for Map Ini would look like this: Trigger: A simple trigger to defeat the player who is marked as the killer would look like this: Good luck! |
| 02-05-2014, 12:55 PM | #3 |
Thank you very much , but one last question , what is the trigger for replacing a unit ? , the purpose of replacing the current unit with a killer unit is that if I don't change the unit of the chosen killer , then he or she won't get any unique abilities , I also need a trigger that plays sounds when someone is killed. Again thank you for that trigger I will use it for my map |
| 02-05-2014, 05:59 PM | #4 |
There is a wide selection of trigger actions available to you. They are organised into various categories, you should familiarize yourself with them as this will help you find what you need in the future. For example, the action to replace a unit with a different unit can be found in the "unit" category. You would add this action to the trigger that randomly selects the killer. You could also keep the same unit and just give it more abilities, there is another trigger action for adding an ability to a unit, again in the "unit" category. In order to replace the unit, though, you need to first know which unit it is. If you preplaced the player units on the map in the editor, then you'd need to do a map-wide search for the unit in the trigger by using the appropriate actions from the "unit group" category. If you instead create the player units with triggers when the map starts then you can easily store them in an array as you create them (by using the "general - set variable" action), that way your triggers would already know which are the main player units for each player when choosing the killer. |
| 03-06-2014, 09:31 AM | #5 |
if all players have the same unit the best solution is to just add abilities. the trigger is unit - add ability. |
