Announcement

Collapse
No announcement yet.

Silly Instagib Mod

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • wicked_lord
    replied
    @slackhead, not sure what the deal is with your server's, I tried to connect to both port's using ProQuake and obviously i could not connect. I then tried DarkPlaces and i was able to connect but for only about 5 second's then i would automatically get disconnected. This happened on both port's and it give's me no error's or reason's why I get disconnected.

    Leave a comment:


  • slackhead
    replied
    Originally posted by PrimalLove View Post
    This only works with the new fteqcc right? I'll have to play around with this!
    I think fteqcc is the only one that supports arrays? Might be wrong though. It certainly makes the mapvote much easier.

    Leave a comment:


  • PrimalLove
    replied
    Also I like this little nugget function Much easier than making exceptions for the different items and weapons in items.qc. Nice.


    Code:
    void() remove_items =
    {
        local string classes[25];
        local float i;
    
        classes[0] = "item_health";
        classes[1] = "rotten";
        classes[2] = "megahealth";
        classes[3] = "item_armor1";
        classes[4] = "item_armor2";
        classes[5] = "item_armorInv";
        classes[6] = "weapon_nailgun";
        classes[7] = "weapon_supernailgun";
        classes[8] = "weapon_supershotgun";
        classes[9] = "weapon_rocketlauncher";
        classes[10] = "weapon_grenadelauncher";
        classes[11] = "weapon_lightning";
        classes[12] = "item_shells";
        classes[13] = "item_nails";
        classes[14] = "item_rockets";
        classes[15] = "item_cells";
        classes[16] = "item_artifact_super_damage";
        classes[17] = "item_spikes";
    
        for (i=0; i<25; i+=1)
        {
            other = find (world, classname, classes[i]);
    
            while (other != world && classes[i] != "")
            {
                remove(other);
                other = find (other, classname, classes[i]);
            }
        }
    };
    I like it. This only works with the new fteqcc right? I'll have to play around with this!

    Leave a comment:


  • slackhead
    replied
    Thanks, I will put those in

    Leave a comment:


  • PrimalLove
    replied
    @slackhead

    A few problems with the code. But not a big deal technically if this is only for multiplayer.

    The way you applied damage of take = 99999; will apply to any monster that uses the T_Damage function and Firebullet function. Basically the grunt. He can gib you with one shot. Also, because you didn't make an exception for doors and triggers with health it will crash the game once you fire on them using the shotgun. if you still want to do it this way just make sure to make an exception for when you hit shootable doors. Also you could just make a totally new weapon and use it in place of IT_EXTRA_WEAPON in defs.qc and then add it to your rotation or just give the player this weapon instead only in deathmatch or perhaps you could just make your own game type like deathmatch 2 or deathmatch 3 so when you have that deathmatch 3 cvar set on the server it will start players with the new weapon.

    Also, if you want to use the shotgun for example, I'd advise not using the built in FireBullets but instead create a new one called FireBullets2 like this one below:

    Code:
    void(float shotcount, vector dir, vector spread) FireBullets2 =
    {
    	local	vector direction;
    	local	vector	src;
    	local   vector vel, org;
    	
    	makevectors(self.v_angle);
    
    	src = self.origin + v_forward*10;
    	src_z = self.absmin_z + self.size_z * 0.7;
    
    	ClearMultiDamage ();
    	while (shotcount > 0)
    	{
    		direction = dir + crandom()*spread_x*v_right + crandom()*spread_y*v_up;
    
    		traceline (src, src + direction*2048, FALSE, self);
    		if (trace_fraction != 1.0)
    		{
    		if (trace_ent.movetype == MOVETYPE_PUSH || trace_ent.movetype == MOVETYPE_NONE) //In case it is a shootable door or trigger use default functions to make damage.
    		    {
    			TraceAttack (20, direction); //Slightly increased this number because you are only using 1 shotcount
    
    		    //shotcount = shotcount - 1;
    		    ApplyMultiDamage ();
    	        }
    	    else  //Everything below will trace the attack, and if it hits an enemy apply T_Damage of 1000000 :) 
    		{
    		vel = normalize(dir + v_up*crandom() + v_right*crandom());
    	    vel = vel + 2*trace_plane_normal;
    	    vel = vel * 200;
    
    	    org = trace_endpos - dir*4;
    
    	       if (trace_ent.takedamage)
    	       {
    		    SpawnBlood (org, vel*0.2, 20);
    		    T_Damage (trace_ent, self, self, 1000000);
    	       }
    
    	       else
    	       {
    		   WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
    		   WriteByte (MSG_BROADCAST, TE_GUNSHOT);
    		   WriteCoord (MSG_BROADCAST, org_x);
    		   WriteCoord (MSG_BROADCAST, org_y);
    		   WriteCoord (MSG_BROADCAST, org_z);
    	       }
    	
    	    }
    
    		shotcount = shotcount - 1;
    	    }
    	}	
    };
    This code will bypass using the regular multidamage and trackattack functions and just apply the damage directly to the target. An exception is made here that will use the default functions for shootable triggers and doors. So the game will not crash!

    This way no need to make any changes to the default functions like T_Damage, etc.


    Also not sure what you are trying to do with the ammo, but if you just wanted to make it infinite ammo just simply do this in W_FireShotgun:

    Code:
    void() W_FireShotgun =
    {
    	local vector dir;
    
    	sound (self, CHAN_WEAPON, "weapons/gun****.wav", 1, ATTN_NORM);	
    
    	self.punchangle_x = -4;
    	
    	self.currentammo = self.ammo_shells = self.ammo_shells - 1;  //Just simply remove the red and you have infinite ammo :) 
    	dir = aim (self, 100000);
    	FireBullets2 (1, dir, '0 0 0'); //This is where I tell it to use the new function for firing. :) 
    };
    Otherwise really enjoyed gibbing. Thx
    Last edited by PrimalLove; 09-13-2014, 02:14 AM.

    Leave a comment:


  • Mindf!3ldzX
    replied
    Originally posted by wicked_lord View Post
    On New connection yet?
    nope,2-3 days.

    Leave a comment:


  • slackhead
    replied
    Nothing wrong with more choice

    Leave a comment:


  • wicked_lord
    replied
    Originally posted by Mindf!3ldzX View Post
    pick any cax mod hosting server, type instagib in console

    gg
    On New connection yet?

    Leave a comment:


  • Mindf!3ldzX
    replied
    pick any cax mod hosting server, type instagib in console

    gg

    Leave a comment:

Working...
X