holi's Recent Forum Activity

  • Thanks for all these helpful tips!

  • Hi everyone,

    I'm about to rewrite an old project in construct after a few years away from it, and wanted to organise code the cleanest possible. I found this interesting article, but unfortunately it seems not up to date: construct.net/en/blogs/skymen-13/optimal-write-events-construct-1049

    Is there a more up to date writing about this topic somewhere?

    Thanks

  • Hello,

    I'm interested by your plugin for Construct2, I can't find it in the store anymore, but it seems still available on itch.io. Is it still working?

    Thanks

  • Alright, your solusitons inspired me: I delete the dictionnary.currentKey at the end of the function and it works as I wanted.

    Thanks!

  • Hi! Sorry for the unformatted code, I never used the option in the forum, I will try to fix this.

    Thanks for the solutions, I will check them out!

    Edit:

    (I did fixed it, I hope it's better)

  • Hi guys,

    I'm having trouble to make something I thougt would be easy.

    I have a pool of aviable characters (around 20), and on the start of the layout, I want to choose some of them (around 10), only once each.

    Since its only a quick project I dont even want to be a clean code, I'm ok with some hardcoding if it's easier.

    Right now I have a 4 variables and a dictionnary in which I repeate the following code:

    Variable: RandomKey = number
    Variable: Used= string
    Variable: index= number
    Variable: count= number (is used to repeat the function 10 times)
    

    On start of the layout

    dictionnary add key (I add all the keys)

    every 0.5sec
    count <= 10 
    	> Function > call "test"
    
    Function on "test"
    -Set randomKey to > int(random(0,Dictionary.KeyCount))
    -Set index to > -1
    	Dictionnary For Each key
    	-Add 1 to > index
    		Index = randomKey
    		find(used,randomKey)=1
    			-Add 1 to > count
    			-set used to > used&","&randomKey
    

    So with that it find randomly some characters, but pick somethime the same multiple times and I dont know how to check if they where already picked.

    Have you any idea on how to do that?

    thanks!

  • Just to let you know, a choose on a tokenat was the key to my problem! Thank you, I learned a lot!

  • Thank you very much for the reply!

  • Hi guys!

    I'm a bit stuck with this one:

    I'm loading functions names from a dictionnary to a global variable, and call them into a choose action to randomly choose some fonctions.

    But for some reasons, construct seems to ignore my request, do you have any idea? every 2 sec > choose("pointYellow","pointRed"levelSelect)

    Level select is the global variable The global variable contain something like ,"pointGreen","pointPink" (with quotes and comas)

    WHY? :/

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In between this test I wanted to make, I crossed the Rable path during an event here in Belgium, aaaaand we figured out the problem!

    In my game flow, when the player lose, he quickly can restart the game, but I did not break the flow for the local storage to be properly saved. That's where the bug come from.

    Thanks everybody!

  • I will try this out!

    Since this bug is more or less random, hopefully in few days this bug will not apears anymore...

    Thanks for the reply!

  • Hi!

    I've got this bug over and over again... The local storage empty itself.

    Have you any idea why?

    Any idea would be helpful, I'm stuck with this from over a year now :(

holi's avatar

holi

Member since 31 Jan, 2012

None one is following holi yet!

Connect with holi

Trophy Case

  • 12-Year Club
  • Entrepreneur Sold something in the asset store
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies