(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Spells

Back   Upload Spell   Reply
  Thread Tools
Sponsored Ads
Skip Ad

Comments
Old 02-27-2008, 11:23 AM   #2 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


I used constant functions all ready so I don't understand what should I do more, if you think that when I use globals whit no array that its not MUI that is not true because if you look better this variables are used in instant actions. Not sure is it fully MUI but MPI is for sure that is enough if its a hero spell right?

Now I know I am not so good but I am still learning jass and how to code a good spell or anything, ty for teaching me about PauseTimer did not know it must be used before destroying it.
Dark_Dragon is offline   Reply With Quote
Old 02-28-2008, 09:52 AM   #3 (permalink)
Diablo-dk
 
Diablo-dk's Avatar

Shifting voidwalker!
 
Join Date: Nov 2004
Posts: 452

Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)


According to the rules, a JASS spell must be fully MUI. Take a look at KaTTaNa's local handle variables system, which is great at making MUI Jass spells. http://www.wc3jass.com/viewtopic.php?t=224

Quote:
, if you think that when I use globals whit no array that its not MUI that is not true because if you look better this variables are used in instant actions
I didn't say it had anything about the spell being MUI. It was a suggestion, so you don't have to follow it, since i do understand why you used globals.

Make the spell fully MUI and null the handle variables, then i'll approve it. (If you don't know what nulling handle variables means, search for a jass tutorial. I'm sure you can find an answer there)
Diablo-dk is offline   Reply With Quote
Old 02-28-2008, 10:18 AM   #4 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


ok I will try this

Edit: Ok its updated now its MUI whit no handle local variables system as no one could find the problem
Dark_Dragon is offline   Reply With Quote
Old 03-24-2008, 06:24 PM   #5 (permalink)
Herman
 
Herman's Avatar

Need to buy myself a comp
 
Join Date: Aug 2007
Posts: 1,049

Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)


Simple improvements

The first, I noticed you used degrees for the angle, as this makes it very easy to write the code, it is almost always more efficient to use radians, I studied your code a bit, and every single time WE needs to loop, it needs to make those unnecessary bj_DEGTORAD calculations

The second, your system to retrieve timer data is good, but I don't see anywhere that you nulled/cleared the timer data global for finished timers, your system would be very good, but it will keep looping through all of your un-used timers every time you retrieve the data, which you do every time the timer expires, almost like putting a loop inside a loop

Either get a different system that doesn't need to loop, or just make sure you clear + null the variables so the system doesn't need to loop through 200 expired timers your not even using

These are both pretty minor, but will definitely improve your code


[For the timer data system, if you'd like a guage on how mcuh better a loopless system would be, those systems only loop once, so if your system only looped once it would be slightly more efficient (less if/thens), but every time it needs to loop, it becomes that many more times slower, in other words if you have 50 timers stored in the data, your system would be 50x slower than a loopless(give or take 5x due to if/thens)]
Herman is offline   Reply With Quote
Old 03-25-2008, 01:51 AM   #6 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


Hi Herman!

Well its nice you got a look in a spell so lets start to explain things out ^^.

1. Using bj_DEGTORAD is much faster then any other conversion as its a global already calculated constant in blizzard.j Its always much better to use constants as they are very fast.

2. There is only one timer per cast which gets destroyed very fast, as function ClearUserTimerData( timer whichTimer, boolean destroy ) so I don't need to do manual destroy. Note that only one timer loops the spell function, and gets soon destroyed.

3. The system of timer data which you say are lot, well as I explained there are timers equal to instant spell casting times. So if 3 players cast spell at same time there will be 3 timers (3 loops) btw jass if/then is fast GUI one creates function which is slow but in jass thats not a problem.

4. Thanks for commenting!

Edit: Lol sorry when I started to make this spell I made it MPI and then I waste my time on why Handle Locals dont work for me, in that time I forget to make ClearTimerData, thanks now its fixed.
Dark_Dragon is offline   Reply With Quote
Old 03-26-2008, 01:06 AM   #7 (permalink)
Herman
 
Herman's Avatar

Need to buy myself a comp
 
Join Date: Aug 2007
Posts: 1,049

Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)


What I ment with the DEGTORAD, was that you should use the RADTODEG function, and just calculate in radians (one of the things that will cost you more time, but will improve your code)

If you don't need/want to do that (or don't know how) it's ok, its a pretty minor thing, should be kept in mind for big systems though

Yeah, I wasn't sure about the timers getting destroyed, it would only be slower if the timers were not removed, but I *think* you said you did

The timer thing is very very efficient way of doing if everything is used properly (I might even switch over to it, because I only ever put handlevars on timers)

Great job !!! :D
Herman is offline   Reply With Quote
Old 03-26-2008, 12:23 PM   #8 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


You were right as I sad I did not destroy timers before I mean I did but did not clear the stored data on timer that was a leak but now its fixed. Only one thing about RADTODEG and DEGTORAD this are not the functions they are global constant variables and its same to say:

set var = 2*3
or
set var = 2 * bj_DEGTORAD

look:

constant real bj_DEGTORAD = bj_PI / 180.
constant real bj_RADTODEG = 180. / bj_PI

where bj_PI is:

constant real bj_PI = 3.14159

So only for your info, it does not matter which one you use they are the same its like you use:

set var = 2/4
set var2 = 4/2

it does not rely matter, note I only tried to explain you, this is for sure same thing as you can find them in blizzard.j dont tread this as function for conversion this is only a constant global variable.

I guess I explained it well, once more ty for comment.
Dark_Dragon is offline   Reply With Quote
Old 03-27-2008, 02:44 PM   #9 (permalink)
Herman
 
Herman's Avatar

Need to buy myself a comp
 
Join Date: Aug 2007
Posts: 1,049

Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)Herman has little to show at this moment (33)


sorry I keep referring to it as a function, but yeah I udnerstand what you mean by the calculations, what I'm saying is inside your actual code you need to constantly flip between radians and degrees, because most of the functions take measurements in radians or return in radians

Although there are a select few that take degrees (like unit facing)
Herman is offline   Reply With Quote
Old 03-27-2008, 10:37 PM   #10 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


Well I guess I explained it well so you now understand that its same do you want to work in RAD or DEG just 1 deg = PI / 180. or 180 deg = PI just what you like to work whit its your same but as its simple to work whit deg so I used deg. If you like more RAD then DEG you can always work in RAD, I just wanted to tell you its same about speed.
Dark_Dragon is offline   Reply With Quote
Old 04-06-2008, 12:11 PM   #11 (permalink)
eWs.Azure
 
eWs.Azure's Avatar

User
 
Join Date: Apr 2008
Posts: 27

eWs.Azure has a little shameless behavior in the past (-4)


looks awesome :D very nice done
eWs.Azure is offline   Reply With Quote
Old 04-14-2008, 04:14 PM   #12 (permalink)
Sacredmage
 
Sacredmage's Avatar

Wannabie Catfood
 
Join Date: Sep 2007
Posts: 23

Sacredmage is an unknown quantity at this point (0)


you have to make the dummies unattackable, the mobs attacked the water beams that fly out when you cast it...
Sacredmage is offline   Reply With Quote
Old 04-16-2008, 05:19 PM   #13 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


they are used for attack effect and cant be untouchable but they are soon removed and there selection hight is 2^11 which cant be seen, and I guess I did something more but not sure: nothing you need to worry!
Dark_Dragon is offline   Reply With Quote
Old 05-12-2008, 12:34 AM   #14 (permalink)
Dragzor

User
 
Join Date: May 2008
Posts: 2

Dragzor is an unknown quantity at this point (0)


How The Fuck U Make This Work
Dragzor is offline   Reply With Quote
Old 05-12-2008, 05:12 PM   #15 (permalink)
Dark_Dragon
 
Dark_Dragon's Avatar

User
 
Join Date: Jul 2007
Posts: 195

Dark_Dragon has little to show at this moment (11)Dark_Dragon has little to show at this moment (11)


Hmm...
1) Plz turn off the caps lock
2) You need to tell me exactly what is wrong!
- Like do you have problems importing it in your map or you want to make spell like that and you don't know how, or is it something else like you don't know JASS or something.

If so then just copy trigger in your map as well as units and ability. Now check which raw codes are used in your map for units and abilities and then simple edit code when you see 'e000' - this is a raw code edit it to match your map.

Good luck, if you cant make it work I may be able to import it for you, if you send me your map.
Dark_Dragon is offline   Reply With Quote
Reply
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

All times are GMT. The time now is 11:56 PM.






Your link here 
Gas Suppliers | Mobile Phone | Website Design | Loans | Credit Cards
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle