Page 1 of 1

Ice Sliding Request for 3ICE

Posted: Thu Dec 24, 2009 1:08 pm
by Justiceemu
Hello, I am making a map that contains ice sliding. I don't know jass so i made a GUI trigger that will move my unit forward every .01. I tried to keep it as simple as possible but it's still slowing down my game after about 20 minutes sliding around on it with 4-6 players ingame. I looked into your ice sliding system and got it to work except i cannot adapt my previous code to using the new one you made because i don't know jass well enough to piece it together. my code made the speed of the unit on ice increase with the windwalk buff and have no sliding at all with the banish buff. if you would be willing to convert my code GUI code into an efficient jass code i would greatly appriciate it. Thank you. i'll upload my project here and give you a link if you would like to look into it.

Image

Heres the map
http://www.mediafire.com/?dryjmjnnivj

Re: Ice Sliding Request for 3ICE

Posted: Thu Dec 24, 2009 11:15 pm
by 3ICE
I hate "Christmas Family Reunions". So much time wasted on faking that you care about your relatives... I didn't even have time to answer this for a whole day.
Anyway, here is the solution:
  • I hope you are okay with using my "Realistic Sliding" mode (Many people get confused too easily and then refuse to understand it at all...)
  • I enabled Realistic Sliding to allow for ranged and melee combat while sliding.
  • I removed the Terrain kill feature.
  • I removed the Zone 3 check, as the Sliding triggers should simply be disabled when sliding is off:
    t_all Trigger - Turn off Steer <gen>
    t_all Trigger - Turn off Slide <gen>
  • I changed the periodic timer from 0.01 to 0.03, because the human eye cannot feel the difference, but computers may suffer a lot from the strain of 0.01 timers.
  • I changed in Setup 1: t_set Set H = (Units of type Assassin) (It will only work once you copy the triggers into your map)
  • I implemented your 4 (three+1) conditions as follows:
    • Removed (Picked unit is a Hero): Not needed with my system.
    • Removed (Terrain type = Northrend Ice): Already in my system.
    • Banish: t_ai GetUnitAbilityLevel(GetEnumUnit(),'BHbn')==0.
    • Windwalk: t_ai if(GetUnitAbilityLevel(u,'BOwk')>0)then set Speed=Speed*2 endif.
  • Done.
Suggestions:
  • Arrays: Instead of 12 integer variables: Kills01_INT, Kills02_INT ... Kills12_INT you can use one integer array variable: Kills[]. (Kills01_INT becomes Kills[1], Kills12_INT becomes Kills[12]). Same for Streak[1-12] and Streak_Copy[1-12]. This way you can avoid 12 IF checks for each player in t_tri Kill Counter and simply use t_tri Set Kills[Owner of (Killing unit)]=(Kills[Owner of (Killing unit)]+1) once. {We just removed about 150 useless lines of code from your map; [2*(11*(3+1) variable settings, 11*4 floating text functions, 11 leaderboard functions, 11 if checks)], yay!}
  • Stop using t_all Do nothing, it does nothing! (proof)
  • Fix the Assassin's icon, maybe?
--3ICE

p.s.: Don't forget to:
  • Read t_tri Help on how to properly import the triggers.
  • Make sure you delete t_tri Tundra Slide and replace it with t_tri Slide in every trigger where it is used.
  • Call t_tri Setup1 from t_tri Spawn Heros (which is spelled as Heroes by the way) to create the t_set H unit group t_all Trigger - Run Setup1 <gen> (or you can merge t_tri Setup1 into t_tri Spawn Heros).
  • Delete t_set Set Slide = 3 from t_tri Setup1 after importing.
  • Change t_set Speed to a smaller number.

Re: Ice Sliding Request for 3ICE

Posted: Fri Dec 25, 2009 12:39 am
by Justiceemu
thanks for putting so much time into this :) i'll get to work on fixing all that, i am just learning to use variable arrays with loops and they would have saved so much time if i did it earlier. maybe i should look into hashables lol. do they do anything useful?

EDIT: ya and i've got oodles of useless variables because i hate the differences between real and integer variables lol. i figured it would be eisier to create another 12 (should be 1) and setting that at the beggining of a trig instead of converting all the existing ones. i'm a lazy programmer :P i should spend an hour and clean all that up.

EDIT: your system is working flawlessly! thank you so much i love it, i'll take a quick video.

Re: Ice Sliding Request for 3ICE

Posted: Fri Dec 25, 2009 12:41 am
by 3ICE
Hashtables are not useful for me at all. (Could be different for you though.)

You're welcome.

EDIT: Answered within 2 minutes, yay!

Re: Ice Sliding Request for 3ICE

Posted: Fri Dec 25, 2009 1:19 am
by Justiceemu
wow again nice reply time :) you're everywhere! lol thanks again.

EDIT: ya ya ya lol, i'll watch my spelling a little more. just getting sloppy because it's 1:30 in the morning on Christmas :).

Re: Ice Sliding Request for 3ICE

Posted: Fri Dec 25, 2009 1:31 am
by Justiceemu
http://www.mediafire.com/?yncjrwcz33j <--- sliding in action, thanks for everything.

Re: Ice Sliding Request for 3ICE

Posted: Fri Dec 25, 2009 1:33 am
by 3ICE
Invalid or Deleted File

Re: Ice Sliding Request for 3ICE

Posted: Fri Jan 01, 2010 12:11 am
by manstie
Upload your map to "www.epicwar.com" instead of mediafire. People actually browse epicwar for maps, I don't think many people will look at your mediafire upload without you referencing them to it.

Re: Ice Sliding Request for 3ICE

Posted: Fri Jan 01, 2010 12:15 am
by 3ICE
^ Do it.