codah's Recent Forum Activity

  • Nope I haven't implemented undo myself but I will need to and that's the first thing I'll look at.

  • I haven't used it but you could look into this

    https://www.scirra.com/forum/viewtopic.php?t=77130&start=0

  • How can I fit a number of sprites into a given (not necessarily rectangular) area? Please see the attached pic. In my case each sprite in a given run will be the same size, but they can be different sizes on different runs. On each run I will know ahead of time how many sprites there will be. I don't want to use platform/solid or physics but open to 3rd party plugins. The appearance can be somewhat irregular as seen in the pic. Thanks.

    [attachment=0:2l653lv7][/attachment:2l653lv7]

  • Are there an exmaples of this where it's actually *smooth* on tablet and phones?

    If you get good results, please give me some tips.

  • codah, It only shoots right away if greater than cooldown time has passed, you wont shoot right away if you shot 0 seconds ago, you'll have to wait the length of the cooldown, but if you havent shot for 10 seconds, you wouldn't expect to wait possible the entire duration of a cooldown for your first shot.

    imagine you had a gun that could only shoot every minute, if you used every "60" seconds, then if the timer was at 61 seconds, and you clicked, you wouldn't shoot a bullet for a whole minute, and would have to be holding the key down for 59 seconds until you shoot, even if you haven't shot once. by using a variable, if your weapon is "cooled down" for the required length of time, then you don't have to arbitrarily hold down the key till the timer hits some value, you'll fire, and then youll have to wait, and youll fire again, etc. Reloading takes a set amount of time after firing your first shot in a series of shots, it doesn't make you wait a random amount of time based on the game timer before being able to fire.

    It's funny because I was going to write a post just like yours, then second guessed myself. I misinterpreted the way the Every x seconds worked in conjunction with something like Mouse: Left button down, or whatever. I guess I always user Timers anyway so I don't have this issue.

  • O_O

  • Also does other layouts eat CPU even if they aren't rendered?

    no

  • the problem with using every X seconds is that you wont shoot right away when you click sometimes, which feel weird especially for longer delays (imagine holding down the fire key for 6 seconds then the bullet comes out).

    Isn't that what they want? i.e. not to be able to fire at will. If you can always shoot right away, how is that a cooldown? Having said that, I usually use a Timer also. Or the Cooldown plugin.

  • Well, your question was kind of vague... So I gave you a pretty generic sample. It pretty much translates into C2 code...

    HowFarInStory is a variable tracking your progress in the game.

    I set it to 0 as a way of saying "has no value" because you can't use variables when setting another variable's initial value in properties. That's done later in 'on start of layout'

    The constants are just a nice way to keep track of special values. Makes your code readable.

  • global constant number AT_THE_START = 1

    global constant number NOT_VERY_FAR = 2

    global constant number QUITE_FAR = 3

    global number HowFarInStory = 0

    System: At start of layout

    System: Set HowFarInStory to AT_THE_START

    <if certain conditions>

    System: Add 1 to HowFarInStory

    <etc>

    System: HowFarInStory = NOT_VERY_FAR

    Function: Call choose("DoNotVeryFarThing1", "DoNotVeryFarThing2", "DoNotVeryFarThing3")()

    System: Once while true

    else

    System: HowFarInStory = QUITE_FAR

    Function: Call choose("DoQuiteFarThing1", "DoQuiteFarThing2", "DoQuiteFarThing3")()

    System: Once while true

    else

    ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Please tell us your requirements, and maybe even provide a full capx. That would make it easer to help.

    Also I think you're confusing what Families can do for you. At design time, a Family's members are object types. At run time, a Family can have a number of picked objects (instances) which can consist of any Family members, or none, or one of each, etc. You can't expect a Family to have 1 instance of each member (as it seems you're wanting to do).

  • hi

    lets say that my player doesnt have pickaxe so i am using my bare hand to pick some rock.

    how do i make it so that if i use bare hand i have 45% change to get ore, but if use pickaxe there is 100% to get ore.

    thanks

    system: random 100 < 45?

codah's avatar

codah

Member since 30 May, 2014

Twitter
codah has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies