Crak0011's Forum Posts

  • I redid the example, now it throws cubes. There is a function that sets the parameters of who spawns and how many and there is a block that is responsible for spawning.File

    It is so generous of you to redo that. Peoples like you play a pivotal role in the community's prosperity. Thank you so much for your time.

    - Remember in Construct3 all functions are executed instantly.

    Got it. 👍

  • I've also noticed something: if I change the "Z" local variable from normal to static and vice versa, the behavior suddenly changes. However, it still doesn't work.

  • But anyway, I'm trying to make it work by looking at yours where you use "Wait for previous actions to complete" when calling the same function multiple times. I wonder why when I use this:

    -> System: Wait for previous actions to complete

    it's not working, but when you did it in your project, it works. I'm still wondering why. What's the issue with calling the same function multiple times with different parameters?

    Is it a bug with the function, or am I doing something wrong? Or is the issue occurring because there is a repeat thing going on inside the function?

  • Hi igortyhon, I have to say you provided an amazing piece of code, thanks for that and your time, but

    I hope I understand your purpose.

    :( Sadly it is the polar opposite of what I am asking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, i really like to pull this using only function and parameters. i dont know why the issue coming with with when calling the same function multiple times with different parameters.

  • Here is the project file

    easyupload.io/43vuxc

  • Thank you, igortyhon. The solution you provided with the timer works great, so does the non-timer way.

    spawn function with customizable parameters.

    Actualy I could't able to make it to the function, as

    + Timer: On Timer "xyz"
    

    it refused to go inside the function's sub event, thus could't make it to the function.

    What I feel is that using a timer might be overkill for my requirement, (but I could be wrong) so I'm now stick with the non timer way and with function because it will help to call it anywhere with parameters.

    So, I posted a separate question that's related to the current query but deals with functions in general. So, I'm hoping that you and oosyrag can please check that.

    construct.net/en/forum/construct-3/how-do-i-8/issue-calling-function-178880

  • So, as you can see, I have the same function but with different parameters called in startup, the layout four times. The thing is when I call it with the "6-second wait," the result is as shown below (Some context: the boxes are given physics properties and they drop from the green point one by one in a short intervels (loopindex), lastly the crown will be spwan, that is the idea). Below The result is exactly what I wanted.

    But the issue arises when I don't use the 6-second wait. If I remove the 6-second wait, the result is as shown below (it spawns everything except the crown).

    So, if I call a single function (instead of four) at a time at the start of the layout, it works great. However, when I call all the four functions at once (unless 6 sec wait is given), the issue arises. My question is, how can I make it work without the 6-second wait? I don't want to use this 6-second wait here.

    So what I'm doing wrong?

    Tagged:

  • Hi igortyhon, initially I tried using Sprite.count, but the problem is I need to call it multiple times on the same layout at different spawning points, so it's not that reliable. Thus, I dropped it and went the function way.

    Now almost everything is done, but the only issue is coming up when creating the CrownObj. I don't know why. It technically should be called once the repeat is done, right? I found a suggestion in this link.

    construct.net/en/forum/construct-3/how-do-i-8/detectwhen-loop-ended-150110

  • Damn, it's been more than two hour, and my previous responce has not been published yet,

    anyways, just futher one question

    How do i detect the repeat is done, I want the CrownObj to be spwan only after the repeat 5 times is done?

  • Thank you,

    * On function 'SpawnFun'

    ----+ System: Repeat 10 times

    -----> System: Wait LoopIndex seconds

    -----> System: Create object SpriteObj on layer 0 at (SpawningPoint.X, SpawningPoint.Y), create hierarchy: False, template: ""

    System: Wait LoopIndex seconds is what I was looking for.

    I was Reading this thread

    https://www.construct.net/en/forum/construct-3/how-do-i-8/wait-inside-forrepeat-loop-157049

    One doubt: why would one use the Timer behavior over 'Wait LoopIndex seconds' for this scenario? Is it because if you want to control the time more precisely, as LoopIndex doesn't allow you to control the amount of delay precisely?

    Is that correct?

  • Any easy way to use wait in Repeat? My req is create object though function after a certain delay intervel.

    (I found a 10 years old post but could't make it work so hence posted)

    Tagged:

  • Thanks a lot :)

  • Please Help

  • How do i click and drag a line of sprites to make a word, as shown on the below image and video.

    Subscribe to Construct videos now