Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Gustavo6046

Members
  • Content count

    1074
  • Joined

  • Last visited

5 Followers

About Gustavo6046

  • Rank
    Senior Member

Recent Profile Visitors

6886 profile views

Single Status Update

See all updates by Gustavo6046

  1. This is a piece of ZDCode being used for the upcoming DecoBot v9 navigation system.

    +WeaponsStay; // inventory flags
    +HasPickup;
    +WasPickedUp;
    +PickupHere
    
    %WeapPickupCheck {
    	^Projectile;
    	*INVISIBLE;
    	
    	&DamageType="ItemGrab"
    	&Speed=4;
    	
    	$PickedUp {
    		:TNT1A 0 @A_GiveToTarget("HasPickup");
    	}
    	
    	#Spawn {
    		:TNT1A 2;
    		:^Stop;
    	};
    	
    	#Death {
    		:?PickupHere ==1 =>PickedUp;
    		:^Stop;
    	};
    };
    
    %WeaponSpot {
    	&DamageFactor=0;
    	&DamageFactor="ItemGrab", 1;
    	&Radius=64;
    	&Height=48;
    	&PainChance="ItemGrab", 255;
    	
    	*SHOOTABLE;
    	*INVULNERABLE; // VERY important so it doesn't 'die'
    	*TOUCHY;
    	
    	// template functions
    	$GiveWeap {};
    	$SpawnWeap {};
    
    	#PickedUp {
    		:(GiveWeap);
    		:^Goto Death;
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    
    	#CheckLoop {
    		:TNT1 A 1 @A_RadiusGive("PickupHere", 192, RGF_MISSILES);
    		:?WasPickedUp ==1 ->PickedUp;
    		:TNT1A 1;
    		:^Loop;
    	};
    	
    	#Death {
    		:TNT1A 0 @A_Jump(2, 2);
    		:TNT1A 0 @A_Log("Somebody picked up this item.");
    		:^Stop;
    		:TNT1A 0 @A_Log("Somebody once told me"); // Nunc at apicem, brasiliensium autism erumpat in risus, et, eodem tempore, erit eligit locum ignis.
    		:^Stop;
    	};
    };
    
    %SafeCH :Chainsaw {};
    %SafePS :Pistol {};
    %SafeSG :Shotgun {};
    %SafeSSG :SuperShotgun {};
    %SafeCG :Chaingun {};
    %SafeRL :RocketLauncher {};
    %SafePG :PlasmaRifle {};
    %SafeBFG :BFG9000 {};
    
    %WeaponCH :WeaponSpot ->Chainsaw {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeCH", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeCH", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponPS :WeaponSpot ->Pistol {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafePS", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafePS", 0);
    	};
    	
    	// function inheritance does not work
    	$PickedUp {
    		:(GiveWeap);
    		:?WeaponsStay ==1 ->Death;
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponSG :WeaponSpot ->Shotgun {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeSG", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeSG", 0);
    	};
    	
    	// function inheritance does not work
    	$PickedUp {
    		:(GiveWeap);
    		:?WeaponsStay ==1 ->Death;
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponSSG :WeaponSpot ->SuperShotgun {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeSSG", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeSSG", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponCG :WeaponSpot ->Chaingun {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeCG", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeCG", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponRL :WeaponSpot ->RocketLauncher {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeRL", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeRL", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponPG :WeaponSpot ->PlasmaRifle {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafePG", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafePG", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    %WeaponBFG :WeaponSpot ->BFG9000 {
    	$GiveWeap {
    		:TNT1A 0 @A_RadiusGive("SafeBFG", 64, RGF_MONSTERS);
    	};
    	
    	$SpawnWeap {
    		:TNT1A 0 @A_SpawnItemEx("SafeBFG", 0);
    	};
    	
    	#Spawn {
    		:TNT1A 0;
    		:TNT1A 0 @A_SpawnItemEx("WeaponSpot");
    		:TNT1A 0 @A_GiveInventory("WeaponsStay", 1);
    		:(SpawnWeap);
    		:^Goto CheckLoop;
    	};
    };
    
    //=====================================//
    +IsCorridor;
    +IsWall;
    +IsMonster;
    +IsHealth;
    +IsWeapon;
    +IsInventory;
    
    %InventorySpot {
    	*INVULNERABLE;
    	*BLOCKEDBYSOLIDACTORS;
    	
    	#Spawn {
    		:TNT1 A -1;
    	};
    	
    	#Pain.NavigationCheck {
    		:TNT1 A 0 @A_RadiusGive("IsInventory", radius + 32, RGF_MISSILES);
    	};
    };
    
    %WeaponSpot :InventorySpot {
    	#Pain.NavigationCheck {
    		:TNT1 A 0 @A_RadiusGive("IsWeapon", radius + 32, RGF_MISSILES);
    	};
    };
    
    %HealthSpot :InventorySpot {
    	#Pain.NavigationCheck {
    		:TNT1 A 0 @A_RadiusGive("IsHealth", radius + 32, RGF_MISSILES);
    		:^Goto Spawn;
    	};
    };
    
    
    
    %Medikit_ : Medikit {};
    %StimPack_ : StimPack {};
    
    %SP_Health {
    	#Spawn {
    		:TNT1 A 0 @A_SpawnItemEx("HealthSpot");
    		:^Goto MakeInv;
    	};
    	
    	#MakeInv {
    		:^Goto Null;
    	};
    };
    
    %SP_Health1 :SP_Health ->Medikit {
    	#MakeInv {
    		:TNT1 A 0 @A_SpawnItemEx("Medikit_");
    		:^Goto Null;
    	};
    };
    
    %SP_Health2 :SP_Health ->StimPack {
    	#MakeInv {
    		:TNT1 A 0 @A_SpawnItemEx("StimPack_");
    		:^Goto Null;
    	};
    };
    
    
    
    %NavCheck :FastProjectile {
    	&PainChance=255;
    	&Speed=96;
    	&Damage=0;
    	&DamageType=NavigationCheck;
    	&Radius=32;
    	&Height=32;
    	
    	*TOUCHY;
    	*FORCEPAIN;
    	*CANPASS;
    	*SOLID;
    	
    	^Projectile;
    	
    	#Spawn {
    		:TNT1 A 2
    		:TNT1 A 0 @A_GiveToTarget("IsCorridor");
    		:^Stop;
    	};
    	
    	#Death {
    		:TNT1 A 1;
    		:TNT1 A 0 @A_JumpIfInventory("IsHealth", 1, 7);
    		:TNT1 A 0;
    		:TNT1 A 0 @A_JumpIfInventory("IsWeapon", 1, 7);
    		:TNT1 A 0;
    		:TNT1 A 0 @A_JumpIfInventory("IsAmmo", 1, 7);
    		:TNT1 A 0;
    		:TNT1 A 0 @A_GiveToTarget("IsWall");
    		:^Stop;
    		:TNT1 A 0 @A_GiveToTarget("IsHealth");
    		:^Stop;
    		:TNT1 A 0 @A_GiveToTarget("IsWeapon");
    		:^Stop;
    		:TNT1 A 0 @A_GiveToTarget("IsAmmo");
    		:^Stop;
    	};
    	
    	#XDeath {
    		:TNT1 A 0 @A_GiveToTarget("IsMonster");
    	};
    };

     

    Meanwhile...

     

    eWsNq0o.png

    1. Show previous comments  2 more
    2. Gustavo6046

      Gustavo6046

      The way ^ mentions "cancer" sounds familiar~ oh wait!

      GnqisKE.png

    3. Old Gregg

      Old Gregg

      Gustavo6046 have you ever drunk Bailey's from a shoe?

    4. AOSP

      AOSP

      Why is a 14 year old applying for a job, anyway?

×