| 02-20-2008, 10:32 AM | #1 |
How would i make an ability with a chance to do something? Like a 20% chance to do a shockwave or something on hit and/or on attack? ----------------- How would i make spell damage have a base damage and bonus damage based on a particular stat? Such as a shockwave with a base damage of 200 with a bonus damage of one-tenth the hero's strength stat ? ----------------- And i have no idea of how to use JASS at all ive only started converting GUI to JASS and it looks pretty crazy and long so if you give me JASS things i wont know how to edit it etc Total Newbness ftl - ThonGod - |
| 02-21-2008, 02:10 PM | #2 |
1. orb of lightning. 2. Make the spell yourself. 3. Learn it. |
| 02-21-2008, 03:17 PM | #3 |
Refer here for jass tutorials. Just stop being overwhelmed and sit down and work through it, it's really not that tough, just takes patience and effort. To achieve stat-based effects, you need to trigger the entire spell. |
| 02-22-2008, 06:20 AM | #4 |
Assuming u know how to trigger then it should be pretty easy, if you dont go look it up (start with GUI is suggested) |
| 02-23-2008, 12:06 AM | #5 |
Try to spend some time to practice JASS, like I did way back when I refused to learn it. I just stopped working on my map and forced myself to code some ridiculous things that I wanted to have. Took me a couple of days or so, then read some tutorials. Adapting yourself to the JASS environment before reading tutorials is good, atleast you won't get overwhelmed and discouraged when you read the tuts and say "Wtf is a syntax?" |
| 02-23-2008, 05:09 AM | #6 |
1. For the first spell, Orb of lightning is a good option if you aren't using orbs for other things. A method that's just as effective but very debatable (and easy to break, if you're smart and fast) is to trigger it. When a unit attacks, check that the unit is the kind you want and/or has the ability you want. Get a random integer from 1-100, and if it's less than or equal to 20, make a dummy cast chain lightning. As I said, Orb of Lightning will cover this just fine if you aren't already using orbs. 2. It has to be triggered, sorry. It may be hard for a shockwave spell, since (unless I'm wrong) it doesn't leave a buff. However, for something like a Warstomp spell or something, all you would do is grab the hero's strength, divide it by 10, and then inflict that as damage. 3. We have a lot of tutorials here. I hate to advertise, but the ones by me, Wyrmlord, and Moyack are really good for beginners and cover a lot of ground. I suggest you check them out. I believe the thread's name is "Collected JASS Lessons", or something to that affect. Here's a few tips that helped me learn JASS.
Good luck learning JASS, it's definitely worth it. |
| 02-24-2008, 09:34 PM | #7 |
I have three solutions that I can think of. Orb of Lightning/Slow: Easy and straightforward, but requires the unit to actually be ordered to attack (or so I've heard). Trigger it with "On Attack:" I normally use it, although it is considered slow (as in, if someone timed every attack properly, they'd be able to multiply their chances to ridiculous amounts). This is easy to do, and most people won't probably won't try to take advantage of it unless they're just screwing around with no purpose. Trigger it with Damage detection: Simply hard to utilize if you're a beginner, and is slightly tedious to work with. I personally call this failsafe, although I've never actually read about any problems with this. Just hard and tedious. As for learning JASS: Just try to do it and persist. I know people say this a lot, but the first hurdle is the river in Egypt called "Denial." You have to bring yourself up to doing it and steel your will. (This goes for just about every programming language.) |
| 03-02-2008, 09:37 PM | #9 |
well i have some small corrections to your code that might save you some space and time.. Instead of hiding the dummy units just give them the locust ability from the object editor. That will save you from an extra action. Also in the object editor when you make the dummy unit in the model feild just write none.mdl that way the unit won't have any model so technically it is ivisible. Note: if you try to place a dummy unit on the map from the editor then you will see a box with black adn green squares but during the game you won't be able to see anything.. And final instead of packing all the dummy units in a group and then destroy all of them just give them 1 sec expiration time (or less just be sure you give enough time to the dummy to cast the spell) and it will be destroyed allone without using an extra trigger for this + it saves you from having 1 extra unit group wich holds some memory. Now as for the dmg part i can't figure out myself a way to make the spell do the right amount. I can only think of a dummy hiting the targets with the amount you want. |
| 03-03-2008, 10:49 AM | #11 |
a few things.. 1. "unit is attacked" is before the projectile is actually launched, so you can spam stop/right click/stop/right click and make the trigger fire like that, use "unit takes damage" instead to avoid this 2. locust makes it unelectable and invulnerable, so yes it's still kinda needed unless you make it invulnerable some other way 3. add an expiration timer to your dummy so that it goes away after like 1 second or so.. and dont bother adding it to a unit group and then clearing it periodically 4. the second trigger uses the wrong event again, so the same problem exists, use "starts the effect of" instead 5. the bonus damage is applied only to the target if there is one, meaning only the unit you click on, id recommend making a dummy with the same ability and like 100 levels of it, each level dealing say 10 damage and then set the level of it + order the dummy to cast it in the same spot, an alternative would be to pick every unit within range of the shockwave every second and then damage them and add them to a group, and then clear the group once the shockwave is done in order to prevent a unit from being damaged more then once by this 6. this dosent matter, but fyi it automatically does "and all conditions are true" if you put more then 1 condition under conditions 7. your trigger has a point leak where you create your dummy, im sure theres a tutorial about leaks somewhere here, but basically you need to set it the location in a variable, use it, and then remove the location with a line of jass |
| 03-06-2008, 04:37 AM | #13 | ||||
Quote:
1. I can only find that is Unit - Specific Unit Event. But i only need it for enemies. ( but i dont really know how to do that so its all ) 2. Thanks =] It's been added and i will test it soon. 3. I think ive already added the expiration timer: Trigger: Then - Actions
![]() Unit - Create 1 Chain Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing (Position of (Triggering unit))
![]() Unit - Add a 2.00 second Generic expiration timer to (Last created unit)4. Thanks again :) its been changed now 5. What if i wanted it to do pretty much exact damage before reductions ? Im not really good at it lol >< 6. It is now removed lol 7. Ill check the leak soon and i have no idea of JASS so i cant really do it. ------------------------------- Quote:
From my testing it seems to work fine except that the dummies tend to be made next to the hero. Quote:
Thanks aswell it has been added and will be tested =] Quote:
Thanks and yes i do have one dummy for each spell. I have removed them now i use one. =] ( i kinda forgot about it ) ------------------------------- So then: Trigger: Actions
![]() Set SPELLDMG = (200.00 + ((Real((Strength of (Casting unit) (Include bonuses)))) / 10.00))
![]() Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing SPELLDMG damage of attack type Spells and damage type Normal------------------------------- And wat is with the damage types? i dont really understand it (like what's enhanced, disease, sonic etc etc types?) ------------------------------- Thanks -= ThonGod =- |
