tarek2's Forum Posts

  • I dont have spline Behaviour but you can use "MoveTo" from Rex as its easier with the conditions that have:

    -Move to target

    -On Target Arrived

    And many more useful triggers and Actions.

    etc......

    Also, you dont need any plugin or behaviour as you can just use MoveAtAngle:

    angle(self.x, self.y, Target.x. Target.y)

  • Sorry, I just realised that this is the Construct 2 section:

    But you can still use the same system in C2.

    I just checked your Picture and here is a few recommendations:

    1-Remove the 0.1

    2-Save the value & Delete the index as I did

    3-Wait 0.5 and call your function

    4-On function check if "Global_Var" = "eins" etc...

    5-Remove all the trigger once as are not needed because the function is already a

    trigger once.

    6-Use Else:

    "Global_Var" = "eins"

    Else:

    "Global_Var" = "zwei"

  • Here is an example see if that helps:

    https://www.dropbox.com/s/bca00qs8yw1zlzh/Array_Delete_Index.c3p?dl=0

  • Create a Local Variable "Index"

    -Set Index to floor(random(Array.width))

    -Store the Array value in to that Global

    -Delete Array index = "Index"

  • To simplify yourself use "Timers" instead as they use already dt internally.

    On Timer "Increase Speed": 
    ------------ad 1 to "Paddlespeed"
    ------------Start Timer "Increase Speed" for 1.5 sec 
    
  • You do not have permission to view this post

  • You cannot put a trigger in a subevent of another trigger, Construct doesn't allow that.

    The "on Key Pressed" is a trigger and "On collision" is another trigger.

    However, you can use "is overlapping" instead in a subevent.

  • It is better to save that type of data in one dictionary so you can load them all at once:

    -On level completed: Add Key "Level_Number" 
    -Save the dictionary.AsJSON into Local Storage
    

    Then at the level select layout:

    On start of layout: Load dictionary.AsJSON from Local storage
    ---------Loop check the levels Key if exist: If not then they are Not Complete yet.
    
  • Here is one possible idea:

    I linked them by instance variable but you can use any other method as long as you can pick the whole group at once to create the container.

    https://www.dropbox.com/s/o306qve8u7aj7g6/Drag%20Multiple%20Objects1.c3p?dl=0

  • There are many issues with this system:

    1-Passing Parameters is confusing

    2-You have to plan everything in advance

    Just planning everything in advance defeats the purpose of creating any "Function Maps" as for me calling by a string means freedom, as simple as:

    Give the Function Name, Parameters if any and done.

    runtime.callFunction("Function Name", Parameter0, Parameter1);
    

    Super simple.

    That's a true dynamic freedom for me at least. Where you dont have to plan anything in advance as everything comes naturally. Normally on most of the games you have to constantly redo the events to optimize, etc... So having to plan constantly "Function Maps" is just a waste of a lot of time in comparison to just:

    -Create a Function

    -Call: runtime.callFunction("Function Name", Parameter0, Parameter1)

    -Delete the function when not need it.

    Also, Dop Pool from one side and I heard many other users through the years that never use "Function Maps", so in true are more people than you think that dont use that. In the end, most of us will continue to use the Scripting just to cal functions and we will lose the advantage of:

    "function maps, you can rename a function and everything still works."

    Anyway.

    Maybe making some Analitycs to see who uses (Scripting Vs Function Maps) will give more accurate info on that probably.

    Or even an official Pool to see how many people use one or the other.

  • You can Clamp the Values:

    If you allow floats Numbers:

    clamp(float(Self.Text), 0, 99)

    If you dont allow floats Numbers:

    Use (Floor or Round) instead of Float

    https://www.dropbox.com/s/te2kpzvjryzn1q7/Clamp%20Value.c3p?dl=0

  • Hoh Sorry, I miss understood, I thought you said that It was not what you were looking for because once it reached (Opacity = 100) jumps to 0.

    No worries then)

  • > You don't need to use scripting to call a function from a string. The event system allows for this too with the function maps feature.

    It's easier to learn JavaScript than to use that, lol. I bet you wouldn't even use it on an actual project as well.

    Lol true))

    Since the new "Function Map" was introduced years ago I haven't seen anyone using it as sometimes this question comes randomly (Discord or Forum) and 99.9% say they use that trick using Scripting even if they dont know how to use JS or never use scripting including myself as at the moment I just use scripting when I need to call a Function by string. The few times that someone said they use it was a new user, so I guess because they never used the old Functions therefore they dont know the difference, so they wouldn't mind spending that much time trying to understand how the New "Function Maps" works which is quite complicate.

    The new "Function Map" could have a revisit to make it more useable in my opinion but if not it's fine the scripting trick is super easy, it's just every time that I use it I have to look at my examples as I keep forgetting the Script structure for the Functions but is not a big deal.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Its not what im looking for but solution is still good, because tween have ping pong option so once started fade to opacity 100 after that come back to 0.

    i use this, thank you kind game developers

    Works fine for me, here is an example:

    https://www.dropbox.com/s/y4vhvjel9pkbj7b/Fade_Layer.c3p?dl=0

    Make sure you set the tween Ease to something like Linear if you haven't done so, as the other tweens have different effects like bounce etc...