Unconnected's Recent Forum Activity

  • This post was still helpful even today. I was trying to figure out how to use UID to keep track of an object.

  • I meant I have a pattern of organized objects and each objects has two values to store.

    There will be more than one pattern...

    Pattern 1

    x1,y1

    x2,y2

    x3,y3

    x4,y4

    x5,y5

    Pattern 2

    x1,y1

    x2,y2

    x3,y3

    x4,y4

    x5,y5

    Each x and y would have it's own value.

    Thanks I will look into that.

  • No. Abs means Absolute Value. There is no opposite for that, that I am aware of.

    Multiplying by -1 seems good for that.

  • In order to turn negatives into positives you can use absolute value.

    abs(-20)

    or

    abs(20)

    will give 20.

  • Useful link.

    Knowing how Collision cells work is good.

  • I'm not 100% sure what you mean by compare X and compare Y?

    I think I would have to compare X and Y on all sides of the object that way.

  • Collision would probably be better for random uncontrollable cases. I suppose if the situation is specific then it would be better to use Distance.

    How would I use Line of Sight? That is only to see if an object can be 'seen'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Games are variable based. If the engine doesn't have a system expression for it then you need to add variables.

    You can then change the variables with simple math using events. If you change a variable the events that have that variable will still work the same way.

    You would want to create a Global Variable called "ClickPoints" and have it set to 1.

    If you have a score then you want to create a Global Variable called "Score".

    If the goal of the game is to destroy objects by clicking, then when that object is destroyed you want to put in an event that will go something like this.

    When the object is destroyed

    Add "ClickPoints" to "Score"

    Every time an object is destroyed it will increase the "Score" variable by how much "ClickPoints" is set to.

    1 will add 1 to Score.

    2 will add 2 to Score.

    This allows you to give the player an upgrade by only changing a variable. It will only change if the conditions you gave it are met.

    You can change the value of "ClickPoints" by using events.

    Add 1 to "ClickPoints"

    or

    Set "ClickPoints" to 2

    You said an upgrade that gives points.

    You can do this with timer, but it will allow people to just wait for points.

    You can also do this by giving extra points every 5 objects destroyed.

    You would have to create a Global variable for that too. "ExtraPoints".

    You will want to create a Global variable that turns this on and off. "ExPointsEnable"

    When the player clicks to upgrade, then you can set "ExPointsEnable" to "On"

    (You can set Variables to Text. On/Off)

    If you want to use time to give extra points then:

    If "ExpointsEnable" is equal to "On"

    Then every X Seconds

    Add "ExtraPoints" to "Score"

    This will give the player extra points every X Seconds. If "ExPointsEnable" is not equal to "On" then it will not add points.

    if you want to give extra points for every 5 objects destroyed:

    You have to add another variable. "GiveExPoints"

    This keeps track of how many objects have been destroyed.

    If "ExpointsEnable" is equal to "On"

    If object is destroyed add 1 to "GiveExPoints"

    If "GiveExPoints" = 5

    Add "ExtraPoints" to "Score"

    Set "GiveExPoints" to 0

    This will give the player extra points every time 5 objects is destroyed.

    If you want you can make a Variable to replace the 5.

    This will allow you to change the 5 to any other number by just changing the value of that Variable.

    By doing this you can easily change how many objects the player has to destroy before getting extra points.

    Change the Variable to 6 or even 20. It will only give the player extra points when "GiveExPoints" equals 6 or 20.

    Everything you do is about manipulating variable values to make them do what you want. It usually involves simple math, but it can get complicated at times. If a variable doesn't meet a condition you made it won't trigger an event.

    If for some reason the player doesn't destroy 5 objects then the extra points won't be added to the score. If the value of "ExPointsEnable" never gets set to "On" then the player never gets the upgrade.

    Upgrades are usually just a variable change.

    The examples are in Pseudocode.. Meaning I simplified them.

    You would use the "System" option for most of them when adding events.

    From there you can pick these first as Conditions:

    Compare two values

    Compare variable

    Every X Seconds

    After pick a Condition you can add an Action:

    Add to

    Set Value

    Subtract From

    That should cover most of it.

  • The way it is structured is important. It should almost always be the top level event.

    It just seems like Distance would be easier for most cases and would be easier on the system.

  • Which one is more labor intensive for Construct 2?

    Physics are not being used.

    If Distance is less intensive for the system you could prevent the need of using collision detection.

    I'm not sure how Collisions are handled.

    Distance(x1, y1, x2, y2) seems more beneficial because it is easier to work with, and is seemingly only 1 mathematical calculation.

    Collision seems like it would be the same or similar calculation, plus it would have to render hidden objects and resize/destroy/create them as needed.

    I read a few times that collisions can take up a lot of resources.

    Just curious on which one would be easier for devices.

  • I have a pattern that is made up of objects.

    The game will have different preset patterns and the player will be able to change between pattern1, pattern2, etc.. with a push of a button.

    Each object in the pattern has an X and Y value.

    Each pattern will have between 9-27 objects stored in it.

    So far I only have 1 pattern planned. I will be adding patterns as the game is more developed.

    I don't think I can preset data into an array.

    Should I store all the patterns in one file or would it be better if every pattern had it's own file to save memory usage?

    I know vaguely of JSON and AJAX.

    I just need to be pointed in a direction.

    How am I able to preset the patterns?

    Should I just create a Function for each pattern?

    It seems like it may be similar. It isn't read unless called upon.

    It would seemingly only increase the amount of events per tick a small bit and the download size.

  • Yes please let us have access to Xbox!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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