Teclis01's Recent Forum Activity

  • The loops seems working but no... i'm wrong

    anyone knows how to retrieve a specific Sprite from it's uid and make action on it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found a solution by replacing the loop for with a loop foreach.

    https://www.scirra.com/tutorials/418/for-each-tutorial

    In fact it seems that in foreach loop it set the instance variable and it's not the case of loop for...

  • this is my condition/subcondition and actions

    (i use the example with 'R' key pressed

    Condition/subcondition :

    System => For "bulletsLoop" 0 to bulletsAlive.Width

    System => Bullet(bulletAlive.At(loopindex)).key == "R"

    Actions :

    ...

    bulletsAlive => delete loopindex from X axis //keep the array up to date

    System => stop loop //don't go further

    How can i get the instance returned by Bullet(bulletAlive.At(loopindex)).key == "R" ?

  • Hello,

    I made a transparent sprite who spawn one or more sprite.

    Sprite instance generated have instance variables as a keyboard key (like 'R' for representing 'R' of the keyboard and a Red bullet on the player's screen)

    Each time a sprite is spawn, i put the uid's sprite in an array

    when a sprite spawned meets a condition that is too late for player for typping the key, i remove the uid in my array and i destroy the sprite (referenced by condition on Sprite)

    A user's action can make destroy before meeting condition just explain before by typping the good key.

    I want to destroy the first Sprite who correspond in my array to the key pressed.

    this is a representation of my array when users press a key

    [0]=32

    [1]=33

    [2]=35

    [3]=36

    [4]=37

    [5]=38

    [6]=39

    [index] = uid of sprite

    I have already made a loop on the array to find Sprite by uid and find the first Red Bullet sprite to destroy and then stop loop

    My question is about how to find the first instance with key=='R' in their instance variable.

    Can somebody explain or show me an example?

    I check for uid documentation but i only found that uid is unique and defined at runtime now the way to get the Object behind an UID.

    Thanks a lot!

  • Hello!

    I would like to know if it's possible to read music on the platform the user is.

    For example would it be possible to read music from an Android phone, tablet, iphone, ...

    It seems that C2 can read Ogg Vorbis (.ogg) and MPEG-4 AAC (.m4a) but from the project.

    Any one knows?

    Thanks

  • I look for a answer in the manual and i found only that :

    https://www.scirra.com/manual/75/how-events-work

    This link mention multiple condition but not with a loop.

    I think i could do that multiple condition by setting a flag but i ll set this flag n times in the loop... that seems so strange to write that...

  • Hello

    I know what i would like to do but i don t know how to do that in C2...

    I get a server response and fill some information in a list (the list contains the list of levels available)

    => Fired on start of layout call a server, when reponse is success, this call a function.

    => Fired On call of the function AND There is a loop to populate the list

    The player choose the level he wants to play

    =>Fired by on selection changed

    I would like to preloads few sound needed for the next layer

    =>Fired by Audio all preloads complete

    I would like all theses actions are done, to set visible the button witch permits to go the the next layer.

    How can i wait until all is done?

  • I find the method to tokenize data so it ll be easy!

    I'm not sure that is a good idea to send JSON, Plain will be enough...

    What do you think about that?

  • Hi

    I just try Ajax feature and would like to make more than just requesting, i would like to use datas returned by server.

    So, to understand, i made a php script returning a simple C2 array

    Echo of the PHP script

    {"c2array":true,"size":[4],"data":["Level1","Level2","Level3","Level4"]}
    [/code:3bsebibk]
    
    I try to put that in a C2 Array and it work well
    Now i would like to populate a [url]https://www.scirra.com/manual/155/list[/url]
    
    How could i iterate on each data to use List method named Add item
    Is there a better way to load that ?
  • I already check manual when you mention function

    I duplicated a lot of code and binded instructions (listenner/handler) by a strange way, i ll not do it anymore!

    In fact by using tutorials and few examples, i thought it was the good way... but i mistake. I'm going to check the entire manual before doing errors like that...

    Indeed, i thanks you again for your replies!

  • Oh my gosh!!! how can i miss that Oo

    You just learn me that there is Function's Object in C2!

    I thought that it was only event oriented programming on sprite, variable,system and i find it just by double clicking... The "Function" Object

    I look a lot of information in manual, made few tutorials and check a lot of example but never see use of that Object...

    I'm sorry about asking you all... You opened my eyes <img src="smileys/smiley36.gif" border="0" align="middle" />

    Anyway i thanks you a lot cause i was missing that feature.

    Oh my gosh i must hide somewhere <img src="smileys/smiley9.gif" border="0" align="middle" />

  • The link seems to be dead...

Teclis01's avatar

Teclis01

Member since 27 Jan, 2014

None one is following Teclis01 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies