mindfaQ's Forum Posts

  • As you already thought, an array is the way to go imo.

    You can even so so far as to implement it in your character stats array.

    each character has it's own x of the array.

    so x = 0 is Cloud, x = 1 is Tifa and so on. An on some y (partyy) they have information like: is in party if it is 1, and is not in party if 0. And on some other y (othery) you could save the menu position.

    When populating your menu you can do:

    for every X AND system compare array.at(array.curx, partyy) = 1:

    display character X at slot array.at(array.curx, partyy)

    Other operations like assigning new positions won't be hard either, just a bit of typing of course, as usual with arrays.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://666kb.com/i/cizareu5vzsm2gklj.png" border="0" />

    your problems:

    • trigger once needs to be grouped with the first condition mouse is over x to work for that condition
    • fading in does only seem to work once when using start fade, fading out seems to work multiple times when using start fade (bug probably that it works multiple times); use restart fade instead

    additionally:

    • on fadeout finished is only triggered once anyway, so no need for trigger once there
    • I added an opacity-condition to always make the fade finish before a next one is started, this will prevent some abrupt opacity changes when it suddenly changes the fade.
  • You shall fill the array with "1" values and then you shall add a ramdomly positionned "2" in that same array 60 times ...

    When filling with "2"s you would run into the problem that random filling would hit other already filled in "2"s in the process, so you'd have to loop some unnecessary times till you managed to find a free place for all "2".

    Easier way that is random and still obtains a 40/60-distribution:

    [your trigger]

    chance = 0.4

    elementsA = 0

    elements = 0

    • empty event : set elements = array.height*array.width*array.depth

    set elementsA = elements * chance

    • array for each xyz:

    -- system compare: random(1) less or equal elementsA/elements: set at (array.curx, array.cury ,array.curz) = A

    substract 1 from elementsA

    substract 1 from elements

    -- else: set at (array.curx, array.cury ,array.curz) = B

    substract 1 from elements

    examplatory runthrough what it does:

    4 places: oooo

    Let's sayA has a chance of 0.75. Elements is 4, so elementsA is 3 -> we get a chance of 3/4.

    for first place the system rolls: rand(0) < 3/4 ->

    Aooo

    A's chance is now 2/3 (since elementsA was substracted by 1 as well as elements)

    for the second place the system rolls a 0.54 ->

    AAoo

    A's chance is now 1/2

    now the system rolls 0.8 ->

    AABo

    for the last roll the chance for A is 1/1 ->

    AABA

  • I upgraded it too the beta because I wanted to view another capx from this forum that was using it. Ofc better stick to the stable version for development. You can install the beta separately without uninstalling the stable version if I am not mistaken.

  • Hey guys, I was wondering what happens in the following case:

    • transparent sprites are filled by loading pictures on demand by URL.
    • a save game is created
    • in another session the save game is loaded

    -> now when a sprite frame is displayed, will it be empty and stay empty or will it remember which frame was assigned with which URL and if I try to display the image, the picture will load and display once it finished loading. Or does the savegame save the pictures that were loaded by url with it (which would lead to a very big save game, so I doubt it)?

    edit: looks like it isn't store. Guess I have to save it to variables and load the images on load complete?

  • instance variables and comparing variables

    the things that collide with each other carry the variables that tell the game which actions to execute.

    So the attack would carry a damage variable as well as pushback pushup slam variables for which you can check. The enemy would carry his health points.

    On collission you check for the special actions a attack could carry with it. A condition could look like: attack.pushback = 1 : do stuff that pushes back the enemy

  • sprite is overlapping textbox

    textbox.text = "five"

    sprite frame = 5: do stuff

    use a dictionary to connect numbers with typed numbers if you wanna use a more general expression

  • I like the bird, it is cute.

    The robot doesn't look like it would be an effective design (short legs with + no joint in the middle -> walking wouldn't be stable, could go with wheels instead if the ground is even). Also shading not consistent (light coming from different directions for different parts it seems, see shoulders, legs).

  • You are using function.returnvalue wrong. The function gives that value back to the event that called the function, so there you could set score to function.returnvalue. BUT you don't even need it in this case.

    Just set score = score*diamonds/healthlost (careful: if healthlost is 0, the value is not defined (can't divide by zero)! Add a subevent with the condition: if healthlost = 0: score = score*diamonds. And another subevent with the condition else: score = score*diamonds/healthlost.)

    So your events could look like this:

    on "totalscore":

    • healthlost = 0 : set score = score*diamonds
    • else: set score = score*diamonds/healthlost

    on "healthlost": set healthlost = 3-health

    done

  • Use an instance variable, set it to 0 for those sprites you don't want to be affected by the on created event, set it to 1 for those who should be affected. Then just add another condition to the on created event (instancevar = 1).

  • Yes, use the AdjustHSL effect. H stands for hue, meaning the color tone. Care: not all devices support WebGL. For those who don't you'd need to setup an animation which would ofc occupy too much space if it is the background.

    example:

    s000.tinyupload.com/index.php

  • Middle = higher y than other ice blocks and lower y than some others, yes? I don't think it would melt away by a function like this.

  • Descending instead of ascending?

    If that's not it, can you explain in more detail what you want to do?

  • Use a instance variable, timetouched.

    then your event:

    object Is dragging: add dt to timetouched

    is touching object would probably work as well as condition. timetouched will store the time it got touched. Don't forget to set it to 0 again somewhere if you want it to reset.