RBuster's Forum Posts

  • : 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.
  • Is possible to use a event to pick several instances at the same time using the UID of each one and then compare frame number and apply an action after?

    Like this?

    Event:
    Pick instance with UID 0
    Pick instance with UID 1
    Pick instance with UID 2
    Pick instance with UID 3
    
    Subevent:                                  
    Animation frame = 3 
    
    Action:
    Set variable to 1[/code:1ajg2q4i]
    
    Thanks
  • I believe the "spawn" with "set (random) frame" are the best solution. Just put the empty sprite in the right place, spawn the sprite and use random to set a aleatory frame (set (random(5)) animation frame). You can use a "set position to another object" command too.

  • Thanks SamRock

    Actually the target is about the same hight of the throw. I think I need to do a kind of parable: a ball is thrown rises slightly and then falls, while decreasing in size.

  • I intend to create a game like circus game: shoot balls in the clown's mouth. For this I need to create the illusion of distance between throw the ball (larger ball) and the arrival to the target (smaller ball). I think it would be right to use lerp to create this animation and maybe I need to simulate physics to show the ball falling. I need some ideas. Thank you.

  • I think a solution would be to create a transparent sprite that enclose an area and link this sprite in the spheres when they were created or apply a pin. Then you could check if the sprite_area is overlapping other sprite_area while comparing the frames to see if the balls are the same color and control the amount through a variable.

  • Thanks for the suggestion

    Racking my brain I got this solution:

    Trigger Once: audio play 1 not looping from Sounds

    Audio on 1 ended: wait 0.5 seconds

    Trigger Once: Audio play 2 not looping from Sounds

    Audio on 2 ended: wait 0.5 seconds

    Trigger Once: Audio play 3 not looping from Sounds

    etc

  • I plan to create a music game and in this game player will have to repeat a sequence of notes in each step until complete the whole song. I would like an explanation on how to generate this sequence and how to compare it with the player sequence. Thanks.

  • newt: Thanks. I think that I understood. I'll try to apply this formula.

  • newt: But in this case I will be changing the position of the object and not the origin point / image point and so I can not properly position the sprite in the grid. Is not it?