Announcement

Collapse
No announcement yet.

Increase ai speed when overlapping

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

  • replied
    It seems like it wasn't my fault at all. I opened up the thirdpersontemplate, and turns out that the blueprint I placed was actually correct, which means that UE4.19.2 have a bug with the get all actors with interface

    Gotta report this quickly before they release 4.20!

    Leave a comment:


  • replied
    I'm starting to lose my mind, and become completely dissapointed to myself that I managed to break the most important thing and now I can't even remember how did I do it last time. Now I'm completely stuck in a never ending nightmare.

    The SpeedChange Event from the npc doesn't get any signal from the message interface at all even if I attached Get All Actors With Interface with it. Why did I had to remove those nodes?

    What did I do in that blueprint from the attachement above this comment that it doesn't send to my npc any interface messages to the event???

    Leave a comment:


  • replied
    I think I've accidently did something and now the SpeedChange_BI doesn't fire anymore in the npc

    I changed my mind on adding a widget that tells the player how many objects he picked up, the widget now works perfect, but I think I kinda messed up in the CollectableBP and now it doesn't send the trigger event anymore. I can understand that it sends to the player but the npc doesn't get any triggering anymore.

    I messed up so badly, and I can't even remember how it was before I broken it...
    Attached Files
    Last edited by Maker26; 06-25-2018, 05:27 AM.

    Leave a comment:


  • replied
    Full delete and edit: I now fixed the problem, both player and npc are now getting the trigger event from the interface.

    Finally I solved the problem, not only that, but I now learned something new.

    Thanks

    Topic solved
    Last edited by Maker26; 06-16-2018, 07:05 AM.

    Leave a comment:


  • replied
    Originally posted by BlackFace_A View Post
    I can't show anymore screenshots cause i am on the phone, and its 23:34 here.
    No worries. Your description is enough....

    Originally posted by BlackFace_A View Post
    The main problem seem to be actually that the Speed Changing BI sends the trigger event to the player, but not to the AI, because the player is the one that overlaps the collectable actor and not the AI.
    Exactly! The Speed-Change event and Interface don't belong inside PlayerBP at all.
    Instead you need to add that Interface to the NPC and just destroy the Player directly.
    You can call Destroy-Actor-Player from the collectable actor, w/o going into PlayerBP.

    Originally posted by BlackFace_A View Post
    Creating a new blueprint interface, and connecting the Event Speed Change BI to it doesn't seem to send any triggering event through the player blueprint at all.
    The challenge is architecting this right. How many AI are there? Interfaces are optional esp. if its 'one'...
    You can use Get-All-Actors-Of-Class (NPC) then Cast-To it and call the Speed-Increase event directly.

    Otherwise create an Interface inside Player / NPC with the same name, that works differently for each.
    For example, create an Interface in each called Collectable_Actor_Overlap_Handler or something etc.
    In the Player implementation -> Destroy Actor->Self. But In the NPC it will bump CMC-MaxWalkSpeed...
    Use Get-All-Actors-With-Interface to get the Player & NPC objects, and remember to call this in a loop...

    Leave a comment:


  • replied
    As it shown in the screenshots above, the guardian is the player, the npc is the AI, and the collectable actor is just a simple actor that has the EventOnBeginOverlap.

    This is how I made with the collectable actor, if the player overlaps with it, it should trigger the blueprint interface shown above and destroy the actor.

    The main problem seem to be actually that the Speed Changing BI sends the trigger event to the player, but not to the AI, because the player is the one that overlaps the collectable actor and not the AI.

    Creating a new blueprint interface, and connecting the Event Speed Change BI to it doesn't seem to send any triggering event through the player blueprint at all.

    I can't show anymore screenshots cause i am on the phone, and its 23:34 here.

    Leave a comment:


  • replied
    Show the Full-Name of BP that houses the overlap event. What triggers the Overlap...
    The Player is overlapping the AI and so the AI BP is triggering the Overlap event???
    Or the AI is overlapping the Player, so the Player Overlap event is being Triggered?

    Leave a comment:


  • replied
    Click image for larger version

Name:	Screenshot_3.png
Views:	135
Size:	91.1 KB
ID:	1489730

    This is how I placed the nodes in the AI BP, but nothing fires. The event Speed Change BI happens only in the player blueprint, because the player touches the collectable actor, and not the AI. But I want my AI to get affected by the event and not the player

    Leave a comment:


  • replied
    Take a step back and label the two Blueprints. Which Blueprint has the Overlap event?
    It calls an Interface, but where's the interface inside the AI BP? Then drag MaxSpeed...
    You do not need to qualify the reference for the CMC, it already exists in the Blueprint.
    Just drag 'Character-Movement' into the graph drag 'Max-Speed' out and you're done...

    Leave a comment:


  • replied
    Yes, the easy part is already made, but still gives me error with the set max walk speed

    Leave a comment:


  • replied
    First, did you fix the easy part?

    Destroy Actor: Always put this at the end of the chain of execution.
    Even add a small delay before it, just in case you add to the code....

    Leave a comment:


  • replied
    Originally posted by franktech View Post
    BlackFace_A

    You need to supply a Character or Character AI or something here. Where is the AI object?
    That's the problem, If I try to connect the custom event to "Cast To NPC" then the cast node won't fire. It tells me that the cast to npc is not needed but it comes with an error when overlapping with the collectable actor

    Detailed edit: It triggers without the cast node but comes with an error when overlapping occurs, but nothing happens if I add the cast node between the custom event and set max walk speed nodes

    Leave a comment:


  • replied
    BlackFace_A

    Everyone is watching Portugal vs Spain! Look, game dev is full of frustrating setbacks.
    You've just gotta push through the pain barrier. That's how big leaps can happen eventually!

    Ok, the Speed-Increase event has nothing to work with. That's why it registers a none error.
    You need to supply a Character or Character AI or something here. Where is the AI object?

    Leave a comment:


  • replied
    Hello,
    Be sure that if someone has a good idea he would ever have give you.

    I've been away for a long time so i may be wrong but in your second blueprint you put a destroy actor and then cast to another one. I would try to do the destroy at last to be sure that what is done after actually is not ignored as actor is destroyed.

    Leave a comment:


  • replied
    Is my problem that hard to be solved, or people who know blueprint way better than me think that I'm gonna find out the fixing already right before they will answer? Cause the fixing for this problem is unfindable on internet.

    I know that I've been posting in this website very often ever since I started using unreal engine. But I don't want to give up on this, I want to continue working on this cool program, I want to learn everything I need to become a true programmer. I don't want to end up giving up just how I did in unity (Hope it's allowed to pronounce the name here) so please, give me a chance to continue and fix this problem that I'm stuck on.

    Leave a comment:

Working...
X