tarek2's Forum Posts

  • Hello. In my project, which I am doing on construct 3, the character has a huge number of animations. Is there any way to combine them together?

    You can already create multiple animations in one object by entering in the Animation Editor:

    Or are you referring to something else?

    As you mention this:

    If you work with the tools I know, you can only create one of these animations in the project:

    Im Not sure if you are referring to something else.

    Also, there are now new import options like the option to import Animations in Bulk by using the Zip, etc...

    https://www.construct.net/en/forum/construct-3/general-discussion-7/animations-editor-new-161331

  • I have 2 texts, and I'm trying to have Text1 show the name and song title, like:

    Array.SongRelease.at(0, cur.Y) & " - " & Array.SongRelease.at(1, cur.Y)

    and have Text2 show the total number of plays, like:

    Array.SongRelease.at(2, cur.Y)

    I can't seem to figure it out myself, and would love love love some help!!!

    There are many questions together so let's deal with this one for now:

    I'm trying to have Text1 show the name and song title

    This sounds like it is for a single song but you are using "Cur.Y" which is used on "Array For Loop" which it will loop through all the Y.

    If you just need a single song and you know on which Y is located then you should use the Index number directly.

    Example:

    If it was on (Y = 1)

    Array.SongRelease.at(2, 1)

    Unless you are printing all the songs using "For Each Y" in that case you will use "Cur.Y" as you do now.

  • How do I do this for multiple buttons? When I try the same events with another button, it only appears for one frame?

    The trigger once will only work well with just one object.

    You will need to use instead a variable to make it work for each object individually.

    The questions here to solve are:

    1-If you have multiple objects and you stop overlapping just one of them what happens? are you destroying all the buttons? because you are still overlapping the other one.

    2-If each "NewGameButton" spawns a "ButtonSelect" and has to be linked to that specific button so only he can destroy it, then you will need something to link them like a variable or Hierarchy so when you need to destroy it you can easily pick the right one.

    If you give a bit more info of what is your goal it will be easier to give you the correct answer.

  • Not really clear what you are trying to replace as you have two replaces going on there, but the normal format will be:

    replace(Text, Find, Replacement-Txt)

    Example:

    Here we have a Global Variable Text and has as a Value = "Apple Orange Banana"

    If we want to replace the word "Orange" with "Fruits" we will do:

    Set Var Text To: replace(Text, "Orange", "Fruits")

    The result will end up like this:

    "Apple Fruits Banana"

  • You can use AJAX "Request URL"

    and just enter as a URL the "FileName.Extension "

  • Just tried this out and you're right, thank you very much. This makes the documentation misleading -- super misleading because it says the opposite:

    Stop on solids

    If enabled, movement will stop if the object collides with something with the Solid behavior, and trigger On hit solid. If disabled solids are ignored.

    Someone needs to fix the documentation and makes sure quirks like that are mentioned in the tooltips.

    I think you may be using by mistake the:

    Sprite "On Collision with another object"

    instead of:

    MoveTo "On Hit Solid"

  • You need to add a trigger once or a variable:

    Example

    Cursor is over "NewGameButton":
    -------Subevent: Trigger once -------------Action: Create Button
    Else: ---------------------------------------Action: Destroy Button
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • omg thank you very much, you are my hero!

    This is what I needed, Good work, God bless you

    Np Glad it was helpful))

    God bless you to you too.

  • That is completely fair and I'm sorry, I'm a bit spastic. I could try to summarise it in three sentences? I think I can do that or just make a new thread. Also, how do you post a project? I just realized I never looked into that. Do I have to use drop box?

    No worries, just trying to make your life simpler.

    If you want to do some training you could fill in some bugs on C3 Github to see what is like You will will be a Master in no time))

    I could try to summarise it in three sentences? I think I can do that or just make a new thread

    Even with "summarise" the thread can end up 3 pages long lol so the best thing is to open a new thread, also by doing that someone else with the same issue can find your thread because the title will match that specific issue so many more users can benefit.

    how do you post a project? I just realized I never looked into that. Do I have to use drop box?

    Yes, Dropbox, Onedrive, Googledrive etc...

    Upload it in any of those and they will give a link so you can share it here.

  • Thanks for answer.

    can u check my project?

    dropbox.com/s/klfgbdn6rzsow19/Spline%20Demo.zip

    (I added behaviors to the archive)

    I only want when I press the REVERSE button, Player starts the reverse moving from the current position. But it does not have such a function

    Thanks for the (Simple Demo + the plugin) that makes it much easier.

    I checked the demo and from what I can see the spine hasn't got the feature of starting at any desired point so that makes it very difficult and limited to deal with. I dont think was meant to work with the reverse in mind, is more like a loop from (First point to the Last) & (Last point to the First).

    Looks really nice though, I heard about it many times but I never use it.

    So the current issue is:

    As you cannot start from any desired point then you have two options:

    1-Either you jump to the last visited point then move (Looks bad)

    or

    2-Wait until he reaches the next point then start reversing

    I added both options so you can choose the one you like most.

    Keep in mind that this at the moment works with looping OFF as we need to hack the points by clearing and adding just the ones that are needed for the direction is going to travel. So if you need looping you will need to watch when hit the last point and clear all the points and add all of them back, other way you could have missing points because when we reverse we remove some.

    For me sounds very hacky but if you like it.

    Spline Capx:

    https://www.dropbox.com/s/11lb07nbqgw0p3r/Spline_Demo.capx?dl=0

    To be honest, I spent hours trying to make it work in a hacky way where from the other side I build my own custom Spine in less than 15 minutes and I have full control, no plugins are needed and you can build more features on top of that.

    Spine No Plugin Capx:

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

  • It's difficult to give an accurate answer in these types of cases as can vary depending on what you need to do:

    Example:

    How many families are we talking about?

    What do you do if an object is part of two families?

    If as you said you have only two families to deal with and 20 objects, then a quick idea could be:

    On your Array store both (Object Name & Family Type)

    Y = 0 -----------Store Object Name

    Y = 1 -----------Store Family Type

    Then to pick the correct family after creating the objects you could do a few else conditions checks.

    ---------------------------------------

    However, if you have many families then you will have to make a lot else conditions, so to keep it cleaner may be a better idea to create Functions to keep everything organized.

    Example:

    Put all the objects in one Family = "Family_List" so we can pick the last created to extract the UID to pass it on inside the Function that we need to call.

    You can keep your current family's.

    Function = Family1_Initialization

    Function = Family2_Initialization

    And so on...

    They will have a (Parameter = UID) so you can pass the last create UID to pick it again inside that function.

    Should look something like this:

    These ideas are just based on the current info you give.

  • Make a subevent under the one you create the objects and use "Pick Last Created"

  • Honestly, I'm totally lost as I'm not sure what are you trying to do or what is the issue as is so many mixes of comments, etc...

    A few tips so they can help you quickly in the future:

    1-Post if possible a minimum project with just the code for those events that are not working so they dont have to go through walls of code.

    2-Explain in sort why is not working.

    3-Explain in sort what is your expected result.

    This way it will make it easier for the user that will try to help you and your issue will resolve much quicker.

  • I designed the "dash" to move to max 64px. But it can teleport the character more.

    Are you saying that your issue is that it travels more than the max 64px?

    One probable reason is that while colliding with the solid wall construct tries to resolve the collisions and it gets pushed up and starts sliding until it reaches the top of that wall.

    If that is the case, one idea is that you could try to stop the dash when colliding with the wall by stopping the tween.

    If that doesn't help it may be a good idea to create a small demo with your issue and share it here so someone else can have a look and help you.