Announcement

Collapse
No announcement yet.

Array not calculating correctly, what am I doing wrong?

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

    Array not calculating correctly, what am I doing wrong?

    So I am doing a speed check for turn based combat. Here is the enemy and friendly DB.
    Friendly: https://imgur.com/avRf1B3
    Enemy: https://imgur.com/d1A1Tu9

    Speed for enemies seems to be calculating correctly but the player doesn't.
    https://imgur.com/keXWgTe

    Yet when calculations are done for some reason the player calculates with very low speed, and always goes last.
    https://imgur.com/AaIiiP8

    You can see here the player calculates with 2 speed and enemy 1 goes first.
    https://imgur.com/AaIiiP8

    Now if the player did have 2 speed this calculation would be correct, but the player should have 10 speed. I don't understand why it is changing the speed.

    The speed from the DB should be pulled directly from it.
    https://imgur.com/oRfNoJR

    Anyone have an idea what's going on here? I have been looking this over for a day and can't find it.

    #2
    Hi man ,
    you uploaded two times same image, i dont see where your calculation happenz,

    Beside :
    1 Break down your blueprint, i only see you adding speed to the array, print your speed often or search in the blueprint for when you change values.

    2 using a simple structure you can rearrange an array in order of speed, having a clear array that show you The actor and the speed in order , and the placement of everybody
    instead of checking like you do in https://imgur.com/AaIiiP8

    Here a Sorting Example
    Click image for larger version

Name:	SORTING_ARRAY_BY_VAR.jpg
Views:	30
Size:	459.1 KB
ID:	1790843

    Comment


      #3
      Originally posted by zarsie View Post
      So I am doing a speed check for turn based combat. Here is the enemy and friendly DB.
      Friendly: https://imgur.com/avRf1B3
      Enemy: https://imgur.com/d1A1Tu9

      Speed for enemies seems to be calculating correctly but the player doesn't.
      https://imgur.com/keXWgTe

      Yet when calculations are done for some reason the player calculates with very low speed, and always goes last.
      https://imgur.com/AaIiiP8

      You can see here the player calculates with 2 speed and enemy 1 goes first.
      https://imgur.com/AaIiiP8

      Now if the player did have 2 speed this calculation would be correct, but the player should have 10 speed. I don't understand why it is changing the speed.

      The speed from the DB should be pulled directly from it.
      https://imgur.com/oRfNoJR

      Anyone have an idea what's going on here? I have been looking this over for a day and can't find it.
      Your speed comparision is not making it all the way down the chain if one of the player references is not valid.
      Check out Zof ( puzzle game ) on Steam:

      https://store.steampowered.com/app/1414480/Zof/

      Comment

      Working...
      X