99Instances2Go's Forum Posts

  • This only spawns health for the first enemy

    Well, no. Not really.

    It is 'Trigger once while true' not 'Trigger once'.

    It triggers once when the event containing that 'Trigger once while true' is true.

    When it is the only condition in that event it will trigger only that one time ... that it self runs as being true.

    And one would think that this event (containing no more conditions) cant be set to false again (actually resetting the trigger).

    That is true when it is a root event.

    But, mind the logic, this true/false has (as every variable does) a scope.

    (read about scopes --->https://www.scirra.com/manual/83/variables)

    Is it a root event, then the scope is the big tick loop.

    Bring it in a sub loop, and the scope is that loop. It will actually reset each iteration.

    I know that this make it worthless in a loop.

  • About

    "either because they're just the reverse of a more manageable mode described above, or because they don't appear to work, as is the case with XOR."

    Xor is not not supported in the WebGL. Works with WebGL disabled.

  • Assuming that there is only 1 player.

    System > pick by comparison ... object = NPC ... Expression = NPC.Y .. less or equal .. value = PLAYER.Y

    _____action ... NPC > move to object .. Where = behind .. object = PLAYER

    System > pick by comparison ... object = NPC ... Expression = NPC.Y .. greater than .. value = PLAYER.Y

    _____action ... NPC > move to object .. Where = in front .. object = PLAYER

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If there is no total 'idle' state, it does not matter.

    I mean ... if each object for sure has state A, B, or C, needing actions for each state.

    If you really want to squeeze out the last possible iteration, then use Browser object to log an (local variable) iteration counter.

    But, watch the logic. The 'foreach char' is not always needed, when things are not personal.

    Example.

    foreach char < ------- unnecessary

    state = A (is dead)

    ____destroy

    state = A (is dead)

    foreach char < ------- unnecessary

    __destroy

  • Pick the one that you want to 'clone'. (and only that one, do not create a picklist containing more sprites)

    Store its expression Sprite.AsJSON in a local text variable.

    Create object somewhere outside screen or so, does not matter.

    Use the action .... Sprite > Set from JSON ... to set the Just Created sprite to the local variable.

    The 'clone' should now be exact.

    Meaning, now you have to set its positions and other things that that you want to be different.

  • ^^^^ Forgot that can be a negative value.

  • https://www.scirra.com/manual/158/third-party-addons

    It is a behaviour. Attach it to an object the same way as any other behaviour.

    Yes that means a lot of re-coding. Got to change every line using physics to use chipmunk in stead.

    The other option is to set world gravity to zero and make you own gravity by applying physics forces/impulses.

  • I dont think you can with the official Physics.

    You can with chipmunk.

  • Global variable UpgradeResource (text) = "Wood" (or whatever is required for a level)

    Global variable NeededResources (number) = required amount

    Add all the resources as keys to an dictionary, assign values, and update them while gathering resources.

    Now you can ...

    Dictionary > Compare value > Key = UpgradeResource ... > .. Value = NeededResources

    __________action ... level up

    That, ofcourse, works fine until you need more 'NeededResources' to level up. At one point you could feel the need to level up when there is 500 wood and 1200 iron gathered.

    Then you come back, and i will advise you to not use that logic that you so really want to use at this point. Just bring it all in 1 array.

    Alternative. You can make a global for each resource, holding whats needed to upgrading.

    Global 'wood' = 20

    Global 'iron' = 0

    Global 'meat' = 55

    Using a dictionary .....

    Dictionary > Compare value > Key = "wood" (a string) ... > .. Value = 'wood' (the global) - 1

    Dictionary > Compare value > Key = "iron" ... > .. Value = 'iron' - 1

    Dictionary > Compare value > Key = "meat" ... > .. Value = 'meat' - 1

    _______actions whatever you want to do to perform a level up

    Arrays & Dictionaries are just, and not more then, a variable holding more values. You should not shy away from them.

    You will need them for 100 % sure at one point. Can as well start using now in a not to complicated logic.

    Want to stay with the concept of globals. No problem. Just cant do that logic that you so weirdly want to do.

    3 Globals.

    1 for each resource, holding whats needed to upgrading.

    Global 'LvUwood' = 20

    Global 'LvUiron' = 0

    Global 'LvUmeat' = 55

    3 Globals.

    1 for each current gatherd resource.

    Global 'CuRwood' = updating while gathering

    Global 'CuRiron' = updating while gathering

    Global 'CuRmeat' = updating while gathering

    System compare 2 values > 'Curwood' > 'LvUwood' -1

    System compare 2 values > 'CuRiron' > 'LvUiron' -1

    System compare 2 values > 'CuRmeat' > 'LvUmeat' -1

    _____________Actions .... level up

  • Use a Dictionary. Add keys, assign values to keys.

  • Zathan

    Have you tried to make it a 1 to 1 relation like this ?

    https://www.dropbox.com/s/l4ymw0h7f0g05 ... .capx?dl=0

  • Subscribe to Construct videos now
    Subscribe to Construct videos now
  • Ciao121

    There is a system action 'Set minimum framerate'. Manual says about that action ....

    Set the maximum delta-time (dt) value based on a framerate. The default minimum framerate is 30 FPS, meaning the maximum dt is 1 / 30 (= 33ms). If the framerate drops below 30 FPS, dt will still not exceed 1/30. This has the effect of the game going in to slow motion as it drops below the minimum framerate, rather than objects stepping further every frame to keep up the same real-world speed. This helps avoid skipped collisions due to stepping a very large distance every frame.

    Additional info: All of Construct 2's behaviors use dt in their internal movement calculations. (exept physics i think).

    Linking one to the other: Timer behavior is using dt. That makes a timer frame independent till the minimum framerate is reached. Lowering the minimum framerate with the system action will make collision defection on very low frames rates virtual impossible.

    Whatever you do with it, just dont allow your game to drop fps below 30 fps.

  • > Did you know that is on YouTube ?

    >

    I didn't know this <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> as in how to make this game and with the same effect as I am after?

    I forgot to share the link. Here goes.

    Subscribe to Construct videos now