Majinboo's Forum Posts

  • copy.com/uYqaoQi11F4wquXg

    I still dont really get what you want to achieve with this. If you want to compensate for typos, then it would be better to employ levenshtein distance.

    Thank you again for your help!! , i was reading about levenshtein distance, i saw your .capx here ( ), with levenshtein distance you can replace or suggest words?

    For example you started to write -> ap and then in the text object or sprite font you get very fast the word-> apple ? before you write the complete word?, your .capx show me levenshtein distance value but i dont know how to implement it.

    I am trying to find .capx examples in the forum about compensate for typos but i cant find anything, i think this is hard to made by me .

    I just want in my game that the people dont have to worry about write the complete word or partial wrong word and dont waste time writing complete words, for example you can write mou and you get very fast the word mountain in the text object or sprite font or if you write ineap you get very fast the word pineapple

    However if i have Sprite Objects in the layout with the two words mouth and mountain then you need to write moun to get the word mountain or mout to get the word mouth but only if you have two sprite objects in the layout with similar word.

    The difference with comparingv3.capx is that with levenshtein distance system you only need to write "ad" and you get instantly in the text object or spritefont the word "advertisement", instantly set var1! and after 0.5 or 1 second clear the text object to write the next word.

    You are very smart, you understand more what i want that I myself, I'll be very grateful if you help me with this.

  • Nvm, understood it... I think.

    https://copy.com/EjoQsnxgYyJL1DYK

    like this maybe.

    it ignores upper case letters, and for each lower case letter it tests whether it matches or not, ignoring order. Then you get a number of matches and non-matches.

    Thank you so much!!, without the help of this community i think i had given up, i spend the whole day trying to modify your code to use spritefont and text object but i cant do it <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> , on text changed dont exist in spritefont / text object, i dont know why i cant understand this, how much tutorials i need to made to be a pro like you? lol.. please help me to fix this, i tried too to destroy objects that you wrote the correct value but didn't work too.

    http://www.filedropper.com/comparingv2

  • Its possible to do this in construct 2? i want for example use Compare variable or Pick by comparision, i want to skip UPPER CASE and if the string match 75% of letters then the value will be correct, for example variable 1 value: PineApple , if my other variable 2 its pienaple then my value will be correct.

  • > No Programming Required!

    > You can now make advanced games without writing a line of code. Construct 2 does the hard work so you don't have to.

    >

    >

    ArraySpawners.capx

    Thank you so much for your help! you saved me again!! i will read about loops!

  • better edit your post and put the URL without http or www, for example: dropbox . c o m /urlpath

  • I read a lot about arrays, but i still cant understand some things, i just want to create 10 enemies (same sprite) with different values (from array) each minute but only those with value 0 in the array, and when my enemy its created then set values from array (of 0 enemies) to variables, i tried this but i cant understand why didn't works, if i have 50 items (with value 0) in the array then each minute i will spawn 10 sprites (each one of the value 0) and each sprite will have the values of Y, after each sprite is destroyed then the value of the array will be 1 then the enemy didn't spawn anymore, please help, i am still reading but arrays are so hard.

    I want to spawn 1 orange, 1 banana, 1 tomato and 1 carrot because they have the 0 value in the array, after i destroy each one then no enemies left to spawn, imagine if i have a big list of 50 items in the array with the 0 value, well i want to spawn 10 each minute.

    This events are an example but i tried a lot of different things, i tried this time using a capx example but this example dont use strings, i cant find any tutorial or example with strings, i tried to replicate all the events and i get this error:

    String its a text value, i cant find in the forum how to use strings with array.at :/

    <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> , i spend the whole day reading about arrays, searching in forums and reading tutorials, i just give up, if this is hard i cant imagine how real programming will be.

    My Capx:

    http://www.filedropper.com/arraynightmare

  • thanks a lot for the help, this exactly what i want: , but i need to solve the problem of count "outside time", i will try with rex plugins.

  • Its possible to count "outside" time in construct 2? for example if i kill a type of enemy i want to see this enemy again in 2 hours (outside time, not in game time) and other type of enemy in 1 hour, you can close the game and save progress before 15 minutes of playing but the next time that you open the game if your enemy have more of 2 hours dead (outside time) then the enemy will spawn again, i know construct 2 can count in game time but i want to know if construct 2 can count "real or outside time", i think must be something like: last saved game "time / date" + last login hour/date.

  • Text file=>Array=>Instace variables

    Monsters.capx

    Thank you for your help!! because i am dumb in programming i just use this tool: http://www.textmechanic.com/ to transform my .txt file to the c2 json format then i will understand more my code in construct 2, i will read now a lot of tutorials about arrays to try put the values of the array in the variables, thanks for your capx example, now i can understand more how to do this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a big list of names with age, type and level information,, i want to create 1 object with those information in variables, i don't know how to put those information in variables without creating many sprite object outside layout, maybe i need to use an array but i don't know how to use it in this case, and with the array creator how i can import 500 or more information to the cells without doing all this work manually? i have this list in a txt file, please give me ideas, i dont want to create 500 sprites outsite layout of course, i just want to put those names, age, type and levels in variables when the monster is created and i want to created those monsters for level, for example create 10 monsters level 1. etc..

  • Majinboo

    well, I am not sure I fully understand what you are trying to accomplish here, but I restructured your capx the way I think you want it to work... (it looked like you wanted to allow up to 2 of any name to be pinned, but after that no more of that name could be pinned).

    I didn't use the HavePin and PinDuplicated variables because I was able to do it without them, and they were just complicating things (you were only marking pinned ones as duplicated but that was not stopping additional ones of that name from getting pinned because if they were unpinned they were not being told that name was already duplicated).

    also, you were running the duplicate check on every tick - over and over again, even though most of the time nothing was changing. It is good practice to only check for things when something changes. So, now it only looks for duplicates before it tries to pin the current instance.

    http://www.rieperts.com/games/forum/PinnedObjects.capx

    You are awesome!!!, thank you so much!!! i will study this amazing example to understand more about construct 2, i never thought that a global variable can store values of different objects.

  • This works only with individual objects and after destroying the pinned object i cant get the Boolean to false!, i want to set PinDuplicated "true" to all objects of the same type, for example if i have two pinned objects to two objects of the same type then all objects of the same type will have PinDuplicated "true", i dont why this is so hard to me, maybe i have low IQ? I was bad at math in high school .

  • Majinboo

    I would do the UID instance variable the other way around:

    instead of storing the names,UID in the PinName object, I would store the PinName.UID in the names object.

    Then, anytime you pick a names object you can see if its PinNameUID variable is 0, then you know nothing is pinned to it. If there is a value in there, then you can pick the PinName object directly by that UID (rather than having go searching for PinName objects pointing back to the names object). That should simplify your code a lot.

    (unless, of course, you want to have more than one PinName object pinned to the names object at a time... but it doesn't look that way to me)

    thank you for your help, now i can identify objects with pinned object, but i am trying to identify "duplicated" objects with the same type of pinned object and didn't work by this way:

    or

    Even i tried to pick Names object with the same UID and didn't worked.

    CAPX:

    http://www.filedropper.com/identifypinn ... atedpins_1

  • >

    > > Scratch that

    > >

    > Sorry, i don't understand, what i need to scratch?

    >

    Sorry.. I gave a wrong solution so I edited my previous post..

    Was a bit too quick with my answer..

    I cant see the solution

  • Scratch that

    Sorry, i don't understand, what i need to scratch?