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

War3:Source
September 21, 2012, 09:53:57 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: race question  (Read 223 times)
thamill21
Newbie
*
Posts: 7


View Profile
« on: July 20, 2012, 06:32:04 PM »

would it be possible to make a race with a faster reload on the weapon?

Im working on making a race and i would like to add that..


If you could help that would be awesome.

Thanks
Logged
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #1 on: July 20, 2012, 07:03:48 PM »

Yes that should be entirely possible, no I do not remember how.
Logged

thamill21
Newbie
*
Posts: 7


View Profile
« Reply #2 on: August 05, 2012, 09:48:31 PM »

Does anyone know how to do this??

i thought about making the ult fast reload. And making the ammo in the gun just reset.
But if there is a way to speed up the reload then i would rather do that.

Please if anyone can help let me know thanks.
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #3 on: August 06, 2012, 07:06:37 AM »

I don't remember either, but you could try playing around with usermessages, "ReloadEffect" or "PlayerAnimEvent"
you probably need reversing skills or find documentation for ReloadEffect, PlayerAnimEvent got a TemporaryEntity it probably has the same arguments/or use tempent instead

you can also try invoking the reload virtual functions of CBaseCombatWeapon on the desired entity
when doing so, check this out:
CBaseCombatWeapon::FinishReload(void)
CBaseCombatWeapon::AbortReload(void)
CBaseCombatWeapon::Reload(void)
my guess/attempt would be to: try calling FinishReload with a little delay on weapon_reload to see if it is working
« Last Edit: August 06, 2012, 11:05:06 AM by Revan » Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #4 on: September 17, 2012, 08:01:02 AM »

Yes it's possible, for TF2 Im sure, but for CS I'm not sure if it is the same.  You will need to increase Attack Speed.

Then main part of this that you will need for your race is setting the attack speed: fAttackSpeed

Put this near the very top of your programming:

new Float:forclustfulpower[5]={1.0,1.05,1.10,1.15,1.20};

Insert this part after your OnWar3LoadRaceOrItemOrdered:

Also you will need to replace SKILL_LUSTFUL_POWER with your own skill name.

Code:
public OnRaceChanged(client,oldrace,newrace)
{
if(newrace!=thisRaceID)
{
War3_SetBuff(client,fAttackSpeed,thisRaceID,1.0);
}
else if(War3_GetRace(client)==thisRaceID)
{
ActivateSkills(client);
}
}

public ActivateSkills(client)
{

    // lustful power
    new skill_lustful_power=War3_GetSkillLevel(client,thisRaceID,SKILL_LUSTFUL_POWER);
new Float:orclustfulpower=forclustfulpower[skill_lustful_power];
War3_SetBuff(client,fAttackSpeed,thisRaceID,orclustfulpower);
}

Part of this code is from my OrcishForce Race.
« Last Edit: September 17, 2012, 08:11:32 AM by -El Diablo » 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!