Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 03:25:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Setting max speed problem  (Read 256 times)
Fallen
Newbie
*
Posts: 3


View Profile
« on: September 18, 2011, 12:01:04 AM »

Hay guys I'm just having a problem setting the max speed of my race(IRK *facepalm*).
Any way the idea is as the players is reduced as he lvls his hp.
 I've tried it two ways on of witch I believe is outdated the other I'm not shure why it isn't working any way this is how I've tried to do it if any one can point me in the right direction that would be amazing.
2nd atempt:

Code:
new skill_speed=War3_GetSkillLevel(client,thisRaceID,SKILL_HEALTH);
new Float:speed=1.0;
switch(skill_speed)
{
case 0: // skill level 0, no speed increase
speed=1.0;
case 1: // skill level 1, 20% speed increase
speed=0.8;
case 2: // skill level 2, 40% speed increase
speed=0.7;
case 3: // skill level 3, 60% speed increase
speed=0.6;
case 4: // skill level 4, 80% speed increase
speed=0.5;
}
War3_SetMaxSpeed(client,speed);

first attempt

declared above new
 
Code:
Float:f_Speed [5] = {1.0, 0.8, 0.7 ,0.6 ,0.5 };

then in my passive skills func
Code:
new skill_speed=War3_GetSkillLevel(client,thisRaceID, SKILL_HEALTH);
new Float:speed=f_Speed[skill_speed];
War3_SetBuff(client,fMaxSpeed,thisRaceID,speed);
« Last Edit: September 18, 2011, 01:19:13 AM by Fallen » Logged
Fallen
Newbie
*
Posts: 3


View Profile
« Reply #1 on: September 18, 2011, 02:17:08 AM »

trying to use a slow instead Shocked
Logged
Fallen
Newbie
*
Posts: 3


View Profile
« Reply #2 on: September 18, 2011, 02:35:25 AM »

worked lol  Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!