mindfaQ's Forum Posts

  • Save the state info into an array on first launch and read the states from the array when you load the level. You can easily update the states in the array when you complete a level.

    example:

    start with an array of size 0,1,1

    on start of layout

    -if array.height = 0:

    -- for each levels_button ordered by levels_button.level descending:

    --- if array.height < levels_button.level: set size to levels_button.level,1,1

    --- : set at levels_button.level-1: levels_button.state

    • for each levels_button ordered by levels_button.level ascending:

    -- : levels_button set state to array.at(levels_button.level-1)

    set levels_button animation frame to levels_button.state

    going to a level:

    • save global var currentlvl = levels_button.level; go to level

    end of level:

    • set array.at(currentlvl-1) = 2; set array.at(currentlvl) = 1

    go to level selection

    and don't forget to set animation speed of your level buttons to 0

  • Competitive game with a ranking in place. Done.

    Actually I think if you keep the game mechanics interesting like giving different approaches to solve a problem (in Civilization this for example would be enabling the players to emphasize on different technologies to play out different advantages each game, also different innate boni, ...), it won't feel like doing the same thing over and over at least not fast. FPS is a problem though, I think the gameplay in those is mostly boring if we are not talking about competitive titles and they are carried by their storiees and some short-lived action-movie-esque fun. The best single player approaches (for me) are probably those that let you play through the campain without killing a single unit.

    The best example of neverending possiblities so far has been DotA/Dota 2 for me. Game keeps staying fresh for me for 7 years now, ofc continuous patches help as well.

  • another variant:

    <img src="http://666kb.com/i/cjwp6exg9s6mzweav.png" border="0" />

    s000.tinyupload.com/index.php

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • pick nearest waypoint to unit.x, unit.y (it is under the waypoint's events): find path to waypoint.x, waypoint.y

  • Why would you need to know the shift keycode?

  • just another alternative

    create a text variable textvar = Alex;John;Stephen;Helen;Tina;Josephine

    go get a random name from this use set name to tokenat(textvar,floor(random(tokencount(textvar,";"))),";")

    You also can add a simple input into the variable if you want.

    like set textvar to textvar&";"&textbox.text

    or another:

    array:

    (start with 0,1,1 sized array)

    when entering text: push array x back value = textbox.text

    when selecting a random name: set name to array.at(floor(random(array.width)))

  • Or just save it in x and y in instance variables of the object. No need for an additional object.

  • I'd just like to get the personal version medal from my Steam Construct 2, but I guess that won't happen ^^.

  • Yeah it should work with negative angles, but if it doesn't, he is a possible math approach:

    if object.angle is less than 0: set object.angle to 360+object.angle%360

    else: set object.angle to object.angle%360

    I hope this is correct. I can't create negative angles by runtime, it just goes from 0 to 359 when setting self.angle-1

    edit: yes works. But wouldn't it be easier to set up the opening of doors like this:

    (when door should open):

    if door.helper < door.openangle: add 1 to angle; add 1 to door.helper (a instance variable)

    (when door should close):

    if door.helper > 0: substract 1 from angle, substract 1 from door.helper

    The helper variable keeps track of how many big of a swing your door already took and if its maximum swing angle is reached, it stops. same for closed.

    Ofc if you want to make it framerate independant you might wanna set it up like this:

    if door.helper < door.openangle: set door.helper to clamp(door.helper+60*dt,0,door.openangle)

    set angle to door.startangle+door.helper

    etc.

  • scirra.com/forum/plugin-firebase_topic79393.html (maybe follow this topic, it could help you, BUT I am not sure how well it exports to node webkit etc.)

  • Help with what exactly?

  • I wouldn't use system time, as it can be cheated. Server time should be more reliable. Of course if you don't want to use an internet connection, then system time is your best bet.

  • You can paste pictures on a canvas (Canvas/Paster plugin), but collision won't be carried through, so that's probably not going to help you.

    Other than that, maybe Containers are an option? There is also a container plugin from rex that let's you add objects to the container at runtime. Or just work with instance variables and/or families.

  • Not sure why you install rex_csv when I linked rex_hash. Also I did not work with it yet, so the only thing I know is that it seems to be able to parse json files that are not specially formated for c2.