RBuster's Recent Forum Activity

  • As I said yesterday, I had to use a variable ("register") to distinguish the frames and got the same problem I had with the UIDs. If I click on a square and the frame is correct, the value of the variable "squareRight" is changed. To change this variable is necessary that all the squares with the variable "register" =1 have been selected.

    Below is the code I used but that does not work

    Event: Pick all square
    Sub-event: Pick square where square.register=1
    Sub-event: Animation frame = 3
    Action: Set squareRight to 1[/code:1tgguz44]
  • RenatoB did you actually try this condition, i think you can combine picking like this / edit: nope you cant

    pick sprite instance 0

    pick sprite instance 7

    pick sprite instance 5

    vtrix,

    I had tried this. BTW, was my first idea.

    you could make them variables and update the numbers when needed

    Okay. It seems that there is no other way.

  • RenatoB , yet another way would be to push the uid you want to check in an array, then for each x, pick uid at array.at(curx) and compare whatever

    vtrix

    But I continue to use UID and in a more complicated way. For me the best would be to use the first blackhornet solution because I need to manage 6~10 instances only:

    Pick instance by evaluating instance.UID >=0 && instance.UID <=3[/code:2600ry1n]
    
    I changed to :
    
    [code:2600ry1n]Pick instance by evaluating instance.UID=0 && instance.UID =3 && instance.UID =5 && instance.UID =9[/code:2600ry1n]
    
    But the program does not accept && for this command.
  • I'm having problems with the splash screen orientation. When the image is viewed in portrait mode gets everything right. When I turn the phone to landscape mode the image gets distorted and poor quality. It seems that the same image is used in portrait mode

    Another thing. I wonder which version of android generated in XDK intel should I use: arm or x86?

  • Hi Wastrel

    I actually thought about using the blackhornet's solution, but this will force me to create a layout for each level. I have 55 squares on the screen and they are combined to generate drawings of different numbers. I will not always use the same squares. If I use a instance variable, I have to change the value of this variable for each combination. So it would be better to access the instances through UID.

  • You could do this:

    > Event:
    Repeat 4 times
    Pick instance with UID int(tokenat("0,1,2,3", loopindex, ","))
    
    Subevent:                                 
    Animation frame = 3
    
    Action:
    Set variable to 1[/code:3pzsd4qp]
    

    R0J0hound: I tried this solution using non-sequential numbers (0,3,7,9,13) and if I click on one of these instances the value of the variable is changed when in fact I need all the related instances have been selected to change this value . What can I do in this case? Thank you.

  • : So I'll do that too. Thank you,

  • Hi :

    I have included an action in the "on start on layout" event to define the orientation.

    My question is: I need to do this for each layout that use different event sheet or just in the first one ("menu" for example)? Thanks.

  • blackhornet: Okay I'll follow your suggestion. Thank you for your assistance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure exactly what you want to test for so I'll try and help as best I can. Each object is assigned a UID and an IID when it is created, whether that's in the editor (seen when the layout is loaded, but you can check in the properties bar) or whenever you create an object. I don't know if UIDs are reused after an object is destroyed but I suspect not. IIDs are reused, so if you destroy the first 5 objects that were created out of 8 total, the last 3 will be renumbered IID from 5-7 to 0-2. Here's the manual info.

    Colludium: I just need to check the frame number of some specific instances

  • That's the problem with absolute examples; you get absolute solutions.

    You'd be better off flagging the instance you care about in some other manner (instance variable) so you can pick them with a simpler test, rather than with a list of UIDs.

    blackhornet: Instance variables is an alternative but I'm using lots of istances and I need to check just 4~10. The problem is that not always the same instances. Do you know if the example that I wrote before works?

    Pick instance by evaluating instance.UID=0 && instance.UID =3 && instance.UID =5 && instance.UID =9[/code:1bpg7jei]
  • R0J0hound: Thanks for suggesting this solution. I used "tokenat" a few times. I didn't know how to use it in this situation. Many thanks. One doubt: if the UIDs are not in sequence, can I continue to use the "tokenat"?

    blackhornet: Thank you for this simple solution. But how can I do if the UIDs are not in sequence. Maybe something like this:

    Pick instance by evaluating instance.UID=0 && instance.UID =3 && instance.UID =5 && instance.UID =9
    [/code:3qdwh9qz]
    @Colludium: I understood your explanation and I intend to test it, but before I need to know how can I do  if the UIDs are not in sequence. Thank you.
RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies