dop2000's Forum Posts

  • Boolean attack is the deadliest of all!

    FabianB please save your project as CAPX file, upload it to dropbox and share the link.

    It's not possible to help you without seeing your code.

  • Scrap my previous comment, brunopalermo gave me an idea how to do this <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I made a demo:

    http://doptrix.com/C2/BoatWalking/

    capx

    Shadow object is for simplicity and to demonstrate the idea. You can do it without it.

  • Your plan seems good to me.

    I would probably do this with one 2D array object with a couple of instance variables.

    Store all animation sheets in text files (CSV, XML) and load them into the array when you need them.

    Say, when player picks up a new sword, you open LongSword_animations.XML and create a bunch of AnimationArray instances:

    1. create AnimationArray, set variable object_type="LongSword", animation_type="idle"

    2. create AnimationArray, set variable object_type="LongSword", animation_type="attack"

    etc.

    Then you fill in these arrays with data from the XML.

    You'll need to code a bunch of functions, but you'll only have to do it once and will be able to reuse them for all animated objects.

  • In layer properties you can set layer background to black and transparent=No.

    Or do you mean something else?

  • I think there always will be a "parabola effect". You can minimize it a little, but it will still be quite noticeable.

    If you can predict how the boat is moving and calculate where the target location will be at the end of the movement, then you can move your character in straight line directly to that position.

  • How do you change that second object animation? Sprite->set animation or Family->Set animation?

    When you create a sprite which is part of a family, you can't immediately refer to the Family in the same event if you want to change anything about this sprite. I think it's because this sprite hasn't actually been added to the family yet.

    You need to wait a tick or use "On Family Created" event.

    The problem with using "On Family Created" is that you can't pass any parameters to it (obviously), so here is a workaround. You can pass parameters to a function, where you pick family member by UID and then do whatever you want with it:

  • It's still not clear what you want, but the problem may be with Set Animation action.

    You need to specify animation name, don't leave it empty ("").

    If this doesn't help, please share your project CAPX file.

    Also, next time before posting to this forum please try naming your sprites properly - Knife, Phone, Screen etc. Same with variables - what "obj" supposed to mean?

  • You do not have permission to view this post

  • So what are your anchor settings?

    Left edge = ?

    Top edge = ?

    Right edge = ?

    Bottom edge = ?

    Try setting Left edge=Window left, and Top edge=Window Top, others set to None.

  • Another easy way to do this is to start a timer for 3 seconds on Enemy instance when sprites overlap.

    On timer event - destroy the enemy.

    If sprites no longer overlapping - stop the timer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:24kd0t2y]heh this is 50 th variable in my game, so don't know is it Healthy?

    The limit for variables is 55, so you are fine!

    (I'm joking of course )

  • No

  • Can't you use 2D array?

    In your example it will look like this:

    [

    ["John","Megan","Luke"],["diamond","chess",""], ["so", "then", "how"]];

    You can also store strings instead of child arrays (with values separated by comma or some other symbol).

    You'll just need to parse them using tokenat()

    ["John,Megan,Luke","diamond,chess", "so,then,how"];

    Or you can store JSON-strings of child arrays in your parent array. Of course, you'll have to "Load from JSON" before accessing them.

    And finally, you can create several instances of the child array, and in the parent array store child array's UIDs. (or some other unique identifier of child array instances). However, saving and restoring all them from local storage will not be an easy task.

  • You don't really need to include UID in the timer name. Each instance is running its own timer.

    However, you might need to add "For each test_obs_steam" in the On Timer event as another condition or sub-event, because there is a chance that timer will be triggered for 2 instances at the same moment (tick).

    Also, you don't have to stop timer in the On Timer event, as you start it "Once".

  • I didn't know how you were going to select 3 sprites, so I made it random.

    You can do it differently.

    Keeping all instances of the sprite off-screen and then moving 3 to the screen works for a small number of pictures.

    If you have lots of pictures, it will probably be better for each round to create (spawn) 3 instances of the sprite, set the right frame/animation/tag for each of them and set isCorrect=true for one of them.