| 05-02-2004, 08:07 PM | #1 |
1. How do I make a -kill command where it for example P1 selects a usless unit and types "-kill" and then P1's and only P1's units that are selected are exploded 2. how do I make an upgrade that changes a units attack model and dmg? What Im trying to do here is have an upgrad called Buring Arrows that when researched give the archers a flamming arrow attack and a dmg increase of 5. 3. I also need somone to skin/model new heros for me |
| 05-02-2004, 11:42 PM | #2 |
I'll answer your first one. Code:
EVENTS Player 1 types "-kill" as a chat message ACTIONS Pick every unit in ((Units selected by triggering player) and (Owned by triggering player)) and do action (Kill (Picked Unit)) |
| 05-03-2004, 12:32 AM | #3 |
:( another problem, how do u make an upgrade like berserker but for footman? I want the footman to be able to upgrade to a captain and I copied the berserker uprade and set all the vaules to footman and captain but it dosent work!! am I missing somthing that I have to change on the actually footman or captain unit data? |
| 05-03-2004, 01:48 AM | #4 |
UPDATE on my problems 1. I can now get the footman to upgrade but b4 he does u can build a captain at the barracks for some reason even b4 u research the upgrade. 2. -kill still doesnt work 3. buring arrows now works 4. I still need skinners/modelers |
| 05-03-2004, 03:59 AM | #5 |
Player 1 selects a unit selected unit == owned by player 1 set tempSelected[1] = selected unit Player 1 types a substring matching exactly -kill Player 2 types a substring matching exactly -kill ... Player 12 types a substring matching exactly -kill unit - kill tempSelected[player number of (triggering player)] |
| 05-03-2004, 08:39 PM | #6 |
ok, another update
1. I can now get the footman to upgrade into captain but b4 he does u can still build a captain at the barracks for some reason even b4 u research the captain upgrade :\ . 2. -kill WORKS thanks to madfunk 3. burning arrows works 4. I still need skinners/modelers 5. ThyFlame, I delcare your answers uncessisarily difficult and confusing :\ lol. I see you include varibles in almost all of the responses you make but infact u rarely need them. |
| 05-03-2004, 08:56 PM | #7 |
For the Captain thing, try action "Player - Make Captain Unavailable for training/construction by Player 1 (Red)" to disable the Captain initially. Then try this trigger to make the Captain available: Code:
Trigger 001
Events
Time - Every 1.00 seconds of game time
Conditions
(Current research level of <CaptainUpgrade> for Player 1 (Red)) Equal to 1
Actions
Trigger - Turn off (This trigger)
Player - Make Footman Unavailable for training/construction by Player 1 (Red)
Player - Make Captain Available for training/construction by Player 1 (Red)This trigger will check every second of the game to see if the Player has researched the upgrade. If it detects that the research has been completed, then the trigger will stop checking and then make the Footman unavailable and the Captain available. I hope this works! -Shimrra Post Scriptum: If you need modelers and/or skinners, then I would suggest you go to the Artists Request forum. You'll likely get mote of a response there. |
| 05-03-2004, 09:20 PM | #8 |
1. thank you to madfunk and shimrra for solving my -kill and captain problems :D , I fixed buring arrows my self. 2. I still need skinners/modelers 3. ThyFlame, I delcare your answers uncessisarily difficult and confusing :\ lol. I see you include varibles in almost all of the responses you make but infact u rarely need them. |
| 05-03-2004, 09:44 PM | #9 |
hey vex, can u explain to me a little more what exactly that line does and why I would want it? |
| 05-04-2004, 01:10 AM | #10 |
It makes sure the unit group assigned in MadFunk's trigger wont leak memory into the RAM and cause the game to lag over repeated use. |
| 05-04-2004, 01:15 AM | #11 |
how does it accomplish that? what does each part of the trigger mean? that is what I was asking b4, sorry if you did not understand. |
| 05-04-2004, 10:41 PM | #12 |
no one knows how that accomplishs that? or what each part of the trigger means? |
| 05-04-2004, 11:16 PM | #13 |
Unfortunately, I can't much help you here. I can only read simple Jass... However, I would do it because Lord Vexorian is a highly skilled triggerer and his advice is rarely incorrect. Memory leak is caused by certain actions and it causes the game torun slower by eating up a lot of extra memory. If you need a highly indepth explaination of memory leak, search for it in the forums. |
| 05-04-2004, 11:29 PM | #14 |
I just want somone to explain to me what exactly each word of that trigger does/means for example which part gets the trigger, which part deletes it or w/e it does to it. Im trying to learn jass and further my programming skills so I want to be able to relate that triggers to others. |
| 05-04-2004, 11:36 PM | #15 |
A leak is basically when an object resides in memory without a reference and with no way to remove it. Blizzard figured this generally was not too important on a low scale. And decided to provide minimal methods of cleaning up said leaks in the GUI. Unfortuantly, your average AOS game will leak thousnads of groups and locations which all consume huge chunks of memory. set bj_wantDestroyGroup=true is part of blizzard too little too late campaign they started to fight against memory leaks post 1.13. However, as it was very late and they decided they needed a fast way to fix maps that are leaking location but not break compatibility with maps that are not updated to take this effect they updated blizzard.j forGroupBJ method. When firing with this hidden parameter the group you pass will be deleted after full completion of the for group action. There are some rare cases where this isn't the case, but they are so rare and not worth mentioning. However, don't go destroying everything and anything hap hazzardly. Let say we have a group variable called MyGroup: Custom Script: set bj_wantDestroyGroup=true Pick every unit in MyGroup and do action (Kill (Picked Unit)) Pick every unit in MyGroup and do action (Remove (Picked Unit)) Game Display Auto Timed Text Message: Sup dude I killed um and removed them! This snippet of code would be god awful! Because you destroy the group too early. Now the third line of code will cause the thread to crash and you would not get your text message because you are passing NULL (0) to the ForGroup and its expecting a pointer to a group. So a good usage is when you have no variable for a unit group, and a bad usage is when you do have one. However, it is still a "hack", and it is best to create a variable for everything you make and then delete it explicity. This is obviously harder in the stupid gui with its absurd system of sending you the last created instead of letting you directly assign a variable to it. (i.e. set MYUnit=Create 1 unit at location Billy Bob facing Default, instead of going Create 1 unit at Location Billy Bob facing Default. Set MYUnit=Last Created Unit.) |
