Unconnected's Recent Forum Activity

  • I thought 'Time Scale' effected everything using DT. Wouldn't that just set 'Time Scale' to 1 for everything, causing the game to unpause?

    If that is true then wouldn't I just not use DT for inventory?

  • I have a pause button that sets 'Time Scale' to 0

    I am wanting the players inventory to come up when the game is paused.

    Is it possible to still use items when 'Time Scale' is set to 0 or do I have to restructure and use 'Delta Time' to pause the game?

  • I see you marked out the Else statement. I had trouble figuring out why the Line of Sight range was being ignored. I marked it out on the first example.

    I feel I have to explain a small bit. It is more of an hierarchy. Higher rank will go after lower rank. It is similar to a food chain.

    Thanks again. I think 2 families would make more sense. I don't really see a problem with only using 1 though, but am not 100% sure. If anything it will be easier to work with, calling two things by one thing when they are two things can get confusing.

  • I only have 1 family. The objects in the family goes after other objects in the same family. Will that cause any issues? I don't think it would but am not 100% sure.

    Should I have 2 duplicate families?

    Yours is actually cleaner. Mine was a mess from trying to figure it out.

    Thanks for taking the time and helping.

  • You do not have permission to view this post

  • How do I export array to Json?

    It seems like I can open a Json file using a browser, but I'm not sure how to export an Array.

    Do I need another software?

  • I actually came up with a solution.

    I would have to make a new instance variable for selected targets UID and two for target values.

    When a target enters the Line of Sight of the targeting object it will calculate what is needed and set the targets UID and current targets value to the instance variables.

    If there is another target it will Calculate that as well.

    If the new calculated target value is lower than the current one then it will be replaced and the UID will be replaced as well.

    If the targeting object looses the target or the the target is destroyed then the three variables will be reset.

    I'm still hoping for a more simple solution though...

  • https://www.scirra.com/manual/124/system-conditions

    I looked at it and I still have the same issue.

    I am not knowing how to look for the lowest variable value from the family objects.

    Do this:

    Compare

    6,7,3,8

    Select 3.

    Not This

    Check for 1.

    6,7,3,8

    Check for 2.

    6,7,3,8

    Check for 3.

    6,7,3,8

    Select 3.

    To get the value I need, I have to divide two variables.

    The max hp the objects has/ the current amount of hp.

    200/100 is 0.5

    The results range from 0.0001 to 1000.

    I would like this to only have to calculate when an object is targeted.

    Having it calculate every X seconds causes a lot of useless calculations.

    I think the only way to do this without setting up to many variables is by using an Array.

    I can use the objects UID to track in an Array and do the math required as needed.

    This will only return one value at a time, but I can set that value to a single instance variable.

    This is better than creating X amount of variables in case X amount of objects are in Line of Sight.

    I am hoping there is a more simple solution then this.

    The question still remains, how do I select the lowest variable without checking every single possible value.

  • You do not have permission to view this post

  • I'm not sure how I didn't know about those.

    I will have to read up on those.

    I'm not fully ready to implement it just yet.

    If it doesn't work I will be back at a later time, but it seems like it would work.

    I didn't expect a reply so fast.

    Thank you.

  • I have a Family that has rules.

    The Family roams around freely and they select goals depending on instance variables.

    I am using Line of Sight and don't have much experience with it.

    If one NPC sees two or more enemies at once. (like a herd).

    How do I have it select the lower level or the weakest one?

    I know I would use conditions to compare variables, but I am not sure how to check the variable of the objects within the Line of Sight.

    Is there an option for that and I am just missing it?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh wow. That is helpful. I wouldn't have thought of adding a negative to an expression.

    -1 * -1 = 1

    and

    -1 * 1 = -1

    Using abs() or -abs() keeps things simple, and adds a small bit of insurance.

    I would use abs() or -abs() over *-1.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies