Kyatric's Recent Forum Activity

  • You are having a single variable keeping a single UID.

    In that case, only a single instance of a weapon is picked.

    Either keep the UID for the "selected weapons" in an array, or use some boolean variable of sorts.

    This way in the shooting event, you can pick each weapon instance one after the other, according to the number of UIDs stored in your array.

  • I'd recommend to simply make the button purchase visible/invisible instead of destroying it.

    Whether you are using only a single one or have a different button per tower instances.

  • You have the browser "On suspended"/"On resumed" conditions that could do the trick.

    As far as I'm aware, alert dialog are not suspending the application, as they are actually part of the OS/browser (Browser alert), so using the before mentioned conditions should only apply when you are actually "suspending" the execution of the application, going to do something else (checking another application, receiving a phone call, etc...) and so should be the best way to go about things.

    Otherwise, I don't believe there are internal flags or messages that allows you to check "where you are resuming from".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you sure your layer "player" is at the same ordering position in all layouts ?

    Is it in front (on top) of background layers you don't want it to appear under ?

    Is your player object global ? Is its layer propery set to "player" (name of the layer) and not a number ?

    You should consider posting the capx of your project as this will be easier to investigate and tell you precisely what may be going wrong.

    For examples of how to properly use layers, I'd suggest you check out some videos from the C2 Academy, they'll show you how it works exactly.

  • An easy and logical solution would to use underscores "_" instead of spaces in the names of functions/animations and whatever.

  • Using the search function of the forums with the keyword "swipe".

    I found directly after your topic this one that seems like it contains exactly what you could need, doesn't it ?

  • There is a communication issue here.

    What exactly do you mean by "make 3 shots" ?

    Do you mean you want the player to be limited to 3 attempts at shooting or do you mean for the player to shoot 3 projectiles at the same time ?

    As you stated this is the basic code from the example.

    That example does not contain any limitations about the number of shots the player can take.

    If you want to limit to 3 total shots, then simply add this limit yourself.

    Add a global variable "ShotsFired".

    In event "On touch end" Add 1 to ShotsFired.

    In Event "isAiming = 1" add a condition to check that ShotsFired is less than 3.

    This will limit your player shooting more than 3 times.

    This is because of how events work.

    The event sheet is read from top to bottom, the conditions for each event are checked, and if they are true the actions are executed.

    If any condition of the event is false the actions are not executed and the sub events for this event are ignored as well.

  • Then sorry, but you are doing it wrong.

    Consider posting the capx for your project. Without your code and the exact configuration for your project, there's nothing more we can help you with.

    Again, make sure the action is triggered by a user action, this is critical for certain devices.

  • If you mean in the editor, perhaps indeed you missed on "Selection wrapping" as indicated in the Layout View manual article.

    Otherwise, if you mean dynamically "in game", I would have my objects pinned to a sprite used as "background" for the object set. And that is only this object I would move around and dimension according to the set it contains.

    Does it make sense with what you are trying to achieve ?

  • Your expectation is in contradiction with how events work.

    Remember they are read top to bottom.

    This means that there is no interest for you to "nest" the way you want to do in your second example, since the several conditions/events are at the same level and will be read/checked/executed over many ticks. By having same level sub-events of a parent event, you are already nesting logically the execution.

    Due to the fact the action will happen over many ticks (and not in just one or a few) you can't expect a "wait for signal" or "On done" to happen.

    All you can do is have the best condition possible that will allow you to define several states.

    Expect to have to check for ranges to go from a state to another.

    Your code would become something like

    1 Sprite Boolean ToModify is True
    2 - Sprite Angle < 180 ... Sprite Rotate angle + 180 * dt 
    3 - - Sprite Angle >= 180 ... Sprite set Angle = 180
    4 - Sprite Angle = 180 & Sprite Size < OriginalSize * 2 ... Sprite - Set size * 2 * dt
    5 - - Sprite.Size >= Sprite.OriginalSize *2 ... Sprite.Size = Sprite.OriginalSize * 2
    6 - Sprite.Size = Sprite.OriginalSize*2 & Sprite.Opacity > 0 ... Sprite - Set opacity to Opacity - 100 * dt
    7 - - Sprite.Opacity <= 0 & TriggerOnce ... Spawn Particle; Set Boolean ToModify to False;  (or) Destroy Sprite 
    [/code:tk2og5yt]
    
    Notice how 3, 5 and 7 are sub-events to a sub-events, checking for the state/range allowing then to ignore the conditions/execution of their to level event yet allowing for the execution of the next.
    
    You could very well "externalise" some execution using the Function object.
    But you won't prevent having to use conditions to check the state of your current object, whether you use a state variable, or use some direct property check.
  • You are required to monitor the amount you earned yourself and, still as per the licensing terms you really should read at this point, update to the license in the 14 days that follow the moment you reach the income limit.

    Scirra still has a monitoring eye on things as well, but this is indeed not publicly discussed.

    And moreover business laws also ask of companies and money-making individuals to use valid softwares in compliance with the terms of the company which publishes them.

    So consider the authorities of your country as another monitoring eye.

Kyatric's avatar

Kyatric

Member since 18 Aug, 2010

Twitter
Kyatric has 583,405 followers

Connect with Kyatric

Trophy Case

  • 14-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x15
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x27
    Coach One of your tutorials has over 1,000 readers
  • x10
    Educator One of your tutorials has over 10,000 readers
  • x2
    Teacher One of your tutorials has over 100,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

23/44
How to earn trophies

Blogs