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:12:41 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 [2]
  Print  
Author Topic: [old topic] Headcrab  (Read 3942 times)
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #25 on: July 06, 2010, 02:53:20 PM »

public SetWeaponAlpha(client,alpha)
{
   new wep=GetEntDataEnt2(client,m_OffsetActiveWeapon);
   if(wep>MaxClients && IsValidEdict(wep))
   {
      SetEntityRenderMode(index,RENDER_TRANSCOLOR);
SetEntityRenderColor(index,255,255,255,alpha);
   }
}
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #26 on: July 06, 2010, 03:24:22 PM »

undefined error for index
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #27 on: July 06, 2010, 03:26:38 PM »

replace with wep
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #28 on: July 06, 2010, 03:28:26 PM »

undefined error for m_OffsetActiveWeapon
 

Should I just put this at the top of the racefile?
new m_OffsetActiveWeapon;
new index;
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #29 on: July 06, 2010, 03:29:22 PM »

new m_OffsetActiveWeapon=FindSendPropOffs("CBasePlayer","m_hActiveWeapon");
Logged

DarkEnergy
Naris
Jr. Member
**
Posts: 60


View Profile Email
« Reply #30 on: July 06, 2010, 03:32:17 PM »

How to track weapon?

u cant change alpha of entity or weapon or whatever?


Look in the SourceMod forums.

Here is a thread about making weapons invisible --> http://forums.alliedmods.net/showthread.php?t=118760

Code:
public SetWeaponColor(client,r,g,b,o)
{
    for(new i=0; i < 4; i++)
    {
        new entity = GetPlayerWeaponSlot(client,i);
        if(entity != -1)
        {
            SetEntityRenderMode(entity,RENDER_TRANSCOLOR);
            SetEntityRenderColor(entity,r,g,b,o);
        }
    }     
} 
« Last Edit: July 06, 2010, 03:35:39 PM by Naris » Logged
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #31 on: July 06, 2010, 03:38:59 PM »

also knife restriction is not wokring right

it restricts headcrab race to knife but it restricts all weapons form other races
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #32 on: July 06, 2010, 03:40:34 PM »

do a race check
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #33 on: July 06, 2010, 03:47:24 PM »

I did

Code:
public Action:OnWeaponCanUse(client, weapon)
{
if (War3_GetRace(client)== raceID)
{
decl String:name[64];
GetEdictClassname(weapon, name, sizeof(name));

//if(StrEqual(name, "weapon_knife", false))
if (IsEquipmentMelee(name))
      return Plugin_Continue;
}

return Plugin_Handled;
}
Logged

stinkyfax
Full Member
***
Posts: 116


View Profile Email
« Reply #34 on: July 06, 2010, 03:51:33 PM »

Exclusively for padawan.


public OnPluginStart() {
 ACTIVEWEAPON=FindSendPropOffs("CAI_BaseNPC", "m_hActiveWeapon");
}

public SetMyhSuperActiveWeaponInvisible(client)
{
  new weapon =  GetEntDataEnt2(client, ACTIVEWEAPON);
  SetColor(weapon, {255, 255, 255, 0});
}
Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #35 on: July 06, 2010, 04:05:57 PM »

Thanks Jedi but I got knife color finished Iam still having a major issue with weapon restrictions
Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #36 on: July 06, 2010, 05:54:25 PM »

Ok I got most of this race finished

anyone want to help me finish,

The last skill should be a playerdeath skill like undead with a chance to small chance to proc

if it procs it latches on and does a 10% of starting health as damage to killer every second until it kills the attacker or until he dies normally

either way when he dies the headcrab is reborn at the point of death.
« Last Edit: July 06, 2010, 05:59:11 PM by [Oddity]TeacherCreature » Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #37 on: July 06, 2010, 07:41:09 PM »

Exclusively for padawan.


public OnPluginStart() {
 ACTIVEWEAPON=FindSendPropOffs("CAI_BaseNPC", "m_hActiveWeapon");
}

public SetMyhSuperActiveWeaponInvisible(client)
{
  new weapon =  GetEntDataEnt2(client, ACTIVEWEAPON);
  SetColor(weapon, {255, 255, 255, 0});
}


BTW this doesnt work
Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #38 on: July 13, 2010, 11:09:49 PM »

Can anyone update this to the newer version, it is whats keeping me form updating, it works right now on the old version ehre is what I have
skill4 is empty just doesnt say empty- cause I never finished it

Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #39 on: July 14, 2010, 08:41:23 AM »

common.....................learn sourcemod and what the compile errors mean

requires 1.1.2/+
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #40 on: July 14, 2010, 09:12:02 AM »

Thanks - I would like to learn it but I am bound by life (time) constraints.

thank you
Logged

stinkyfax
Full Member
***
Posts: 116


View Profile Email
« Reply #41 on: July 14, 2010, 04:56:15 PM »

Thanks - I would like to learn it but I am bound by life (time) constraints.

thank you
did you mean by WCS?  Cool
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #42 on: July 14, 2010, 04:57:01 PM »

i think thats what he meant
Logged

DarkEnergy
[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #43 on: July 14, 2010, 06:32:46 PM »

stinky u arent developing are u

I am heling WCS since they asked and I can

but my server is running WAR3
Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #44 on: July 17, 2010, 05:09:51 PM »

This was working:
Code:
public SetWeaponColor(client,r,g,b,o)
{
    for(new i=0; i < 4; i++)
    {
        new entity = GetPlayerWeaponSlot(client,i);
        if(entity != -1)
        {
            SetEntityRenderMode(entity,RENDER_TRANSCOLOR);
            SetEntityRenderColor(entity,r,g,b,o);
        }
    }     
} 
and it got rid of the floating knife but it no longer works on new version can anyone figure out why?

also

Can someone code a 4th skill called latchon triggers at player death

Latch on will slay attacker and respawn head crab instantly to attackers positon

% chance small controllable by convar?
Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 461


View Profile
« Reply #45 on: July 19, 2010, 07:13:15 PM »

OK this race now has a 4th latch on skill

It works well and seems pretty balanced along with some new sounds, the only remaining issues is the knife is not invisible, it kind of floats above the headcrabs head.

 
« Last Edit: July 20, 2010, 09:43:11 AM by [Oddity]TeacherCreature » Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #46 on: July 31, 2010, 09:11:37 AM »

create a new topic
Logged

DarkEnergy
Pages: 1 [2]
  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!