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

War3:Source

War3Source Races => Races / Items - Ideas for new races and discussion => Topic started by: thamill21 on July 20, 2012, 06:32:04 PM



Title: race question
Post by: thamill21 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


Title: Re: race question
Post by: Necavi on July 20, 2012, 07:03:48 PM
Yes that should be entirely possible, no I do not remember how.


Title: Re: race question
Post by: thamill21 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.


Title: Re: race question
Post by: Revan 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


Title: Re: race question
Post by: -El Diablo 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.