blueseth's Recent Forum Activity

  • Thank you for the clarification.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • *Edited to include Kyatric's feedback about the UID not changing.*

    I gained insight about UID and IID by reading some forums posts. Here is my attempt to summarize the two.

    C2 increments the UID every time an instance of any object is spawned. C2 increments IID every time an instance of a specific object is spawned.

    Remember that C2 is spawning instances of the circle, square and triangle object types. Also, indexes are zero based so they start at 0 not 1.

    Here's an example. Lets say we have three sprites a circle, a square and a triangle. We tell C2 to spawn 3 circles then 3 squares and then 3 triangles. The UID will increase each time any objects are spawned while the IID will only increase when an instance of a specific object type spawns, for example Circle.

                 UID     IID

    Circle 1      0       0

    Circle 2      1       1

    Circle 3      2       2

    Square 1      3       0

    Square 2      4       1

    Square 3      5       2

    Triangle 1    6       0

    Triangle 2    7       1

    Triangle 3    8       2

    There isn't a right or wrong way to use UID or IID. Your use of UID or IID depends on what you are trying to do. If you want to select the 2nd square you could use the UID of 4 or the Square.IID of 1. Both will give you the same result.

    Something to keep in mind is that the UID and IID will change if you destroy one of the object instances. Using the table from above, if we delete the second instance of the square object type the values will change like this.

                 UID     IID

    Circle 1      0       0

    Circle 2      1       1

    Circle 3      2       2

    Square 1      3       0

    Square 3      5      1*

    Triangle 1    6*      0

    Triangle 2    7*      1

    Triangle 3    8*      2

    Notice how Square 3 is now the 2nd instance of the square object and it's IID changed to 1? You should also notice that the UID of Square 3 stayed the same. All of the triangle UID and IID values stayed the same.

  • Tom your work is appreciated. The search is much nicer to use. Just another example of why you guys kick ass.

  • Thank you, Kyatric. Your post helped me resolve my problem. I added a screen shot of the new working event sheet for any interested parties.

    <img src="https://lh4.googleusercontent.com/-M1HfWbirtkU/TvPajrUeTHI/AAAAAAAAAFg/44D9Qjzt82k/s800/If%252520Statement%252520using%252520Variables.png" border="0" />

  • Hi Tom and Kyatric,

    I'm a brand new user and I came to the forums to make the same request as lucid. In page searching would be awesome, but replacing the current image with a new one that looks more like a button/link is good too.

    I also like the idea of adding a second link going to the forum search because I thought the search covered the entire site including the forums. If you made two smaller buttons you could replace the current image with two new search buttons.

    P.S. I'm loving C2! I'm learning a lot and your site and software are great resources.

  • Hi Arima,

    I am trying to use the set and check variable logic to decide which object to spawn in my game. However, I seem to be missing something because the condition occurring last in the chain always seems to be triggered. Can you help me understand what I am doing incorrectly?

    <img src="https://lh4.googleusercontent.com/-m-Onlv0xJf0/TvFdA-jPnWI/AAAAAAAAAEI/8lJXiR896XI/s800/C2%252520Logic.png" border="0" />

  • I'm interested to see if you succeeded in creating an application in Construct2. I had the same type of idea.

blueseth's avatar

blueseth

Member since 17 Dec, 2011

None one is following blueseth yet!

Connect with blueseth

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies