Results 1 to 4 of 4
  1. #1

    Default how to get AI to recognize a flashlight from the player

    I have an issue with my AI, I got it to recognize my player and to allow it to enter a follow and an attack state. And for my game there is a toogleable flashlight and I want to use that as a cue for my AI to see that as a cue to investigate it. Any ideas??? all help is appreciated

    FYI i only have a very basic AI in case it matters. And i am not a very good programmer

  2. #2
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    What you use for display flashlight in Level..?
    BTW. find sourse code from game that use this interaction ie. Splinter Cell.
    ...
    FYI i only have a very basic AI in case it matters. And i am not a very good programmer
    ...
    ...that's bad.
    Last edited by VendorX; 12-18-2011 at 02:35 PM.

  3. #3

    Default

    class G3N3_Flashlight extends SpotLightMovable
    notplaceable;

    defaultproperties
    {
    Begin Object Name=SpotLightComponent0
    LightColor=(R=0,G=255,B=0)
    CastShadows=true
    bEnabled=true
    Radius=500.000000
    InnerConeAngle=10
    OuterConeAngle=30
    LightShaftConeAngle=45
    Brightness=1
    BloomScale=50
    BloomThreshold=50
    BloomScreenBlendThreshold=10
    BloomTint=(R=0,G=255,B=0)
    RadialBlurPercent=50

    CastStaticShadows=True
    CastDynamicShadows=True
    bCastCompositeShadow=true
    bAffectCompositeShadowDirection=true
    End Object

    bNoDelete=false
    }

    this is my flashlight code and here is how i called it out

    var G3N3_Flashlight FlashLight;

    simulated function PostBeginPlay()
    {
    FlashLight = Spawn(class'G3N3_Flashlight', self);
    SkeletalMeshComponent(Mesh).AttachComponentToSocke t(FlashLight.LightComponent, 'MF');
    //FlashLight.LightComponent.SetEnabled(self.default. bIsFlashlightOn);
    super.PostBeginPlay();
    }

    //------------------------------------------------------------------------------
    // ToggleFlashlight()
    //------------------------------------------------------------------------------
    exec function ToggleFlashlight()
    {
    if(!FlashLight.LightComponent.bEnabled)
    {
    FlashLight.LightComponent.SetEnabled(true);
    }
    else
    {
    FlashLight.LightComponent.SetEnabled(false);
    }
    }

  4. #4
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Location
    California, USA
    Posts
    181

    Default

    You need some code to tell the bots what to do when they see the light. This article should help point you in the right direction
    udn.epicgames.com/.../CharactersTechnicalGuide.html#Decision Making
    Snake
    Author of UT3Dom mod (Domination games for UT3)


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.