Announcement

Collapse
No announcement yet.

Attempting to get a team system set up for custom AI and Projectiles

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

    Attempting to get a team system set up for custom AI and Projectiles

    Our game is an attempt to make a sort of player vs computer, team vs team tower defense. Each side, one player, one AI, has a series of pawns on paths that are meant to kill each other.

    Each side can also spawn towers that fire projectiles.

    Our current problem is that everything can kill everything from the same actor factories. We're trying to figure out a way to create a team system for the AI to not kill each other on one team, but kill everyone else on the other team through both projectiles and melee combat.

    Does anyone have any advice, tutorials, videos, or sample scripts?

    This is a first year college game project, so assume we're all at the rank of beginner please.

    #2
    To clarify some information.

    We've set up triggers in front of each tower, and when a bot enters the trigger it activates a spawn projectile that damages any bot that enters the trigger, regardless of team.

    so we're trying to make one set of spawned bots on one team immune to their own team's spawned projectiles. We have custom projectile scripts

    Is there a way to make our custom bots immune to either the projectile type or a damage type

    Code:
    class CookieRocket extends UTProjectile;
    
    simulated function PostBeginPlay()
    {
    	// force ambient sound if not vehicle game mode
    	bImportantAmbientSound = !WorldInfo.bDropDetail;
    	Super.PostBeginPlay();
    }
    
    defaultproperties
    {
    	ProjFlightTemplate=ParticleSystem'WP_RocketLauncher.Effects.P_WP_RocketLauncher_RocketTrail'
    	ProjExplosionTemplate=ParticleSystem'WP_RocketLauncher.Effects.P_WP_RocketLauncher_RocketExplosion'
    	ExplosionDecal=MaterialInstanceTimeVarying'WP_RocketLauncher.Decals.MITV_WP_RocketLauncher_Impact_Decal01'
    	DecalWidth=128.0
    	DecalHeight=128.0
    	speed=1350.0
    	MaxSpeed=1350.0
    	Damage=35.0
    	DamageRadius=300.0
    	MomentumTransfer=85000
    	MyDamageType=class'UTDmgType_Rocket'
    	LifeSpan=8.0
    	AmbientSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_Travel_Cue'
    	ExplosionSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_Impact_Cue'
    	RotationRate=(Roll=50000)
    	bCollideWorld=true
    	CheckRadius=42.0
    	bCheckProjectileLight=true
    	ProjectileLightClass=class'UTGame.UTRocketLight'
    	ExplosionLightClass=class'UTGame.UTRocketExplosionLight'
    
    	bWaitForEffects=true
    	bAttachExplosionToVehicles=false
    }

    Comment


      #3
      Because you are all new, use the UT stuff to extend from. Override and make empty the behaviors/functions you don't like.

      Look at the Team game. http://www.worldofleveldesign.com/ca...h-gametype.php

      Make an AI controller that is on a team. 1 controller per tower, you could use the events like SeePlayer to cause the Fire action.

      Comment


        #4
        Well if I understand what you're saying, you think we're talking about Team A's tower trigger being activated by Team A's units, which it is not. Team A's Trigger is only activated by Team B's units. The problem is the Spawn Projectile deals damage to everyone in range.

        Our issue is that our spawned projectiles are not associated with any team. They're just their own independently spawned projectiles that we only want to affect one of two teams.

        What I really need to know is how to make a custom bot immune to damage from a specific damage type. IE: Make Bot immune to rocket damage.

        Comment

        Working...
        X