oosyrag's Forum Posts

  • Use bullet behavior, set speed to 0.

    On triggered event, Set Enemy Angle towards Player, Wait 2, Set bullet speed to x.

  • Yes, possible, but the math involved could be quite difficult.

  • If you have conflicts, try implementing a scheduling system for your People objects so that only one gets a path each tick. This method along with your flag/state system should eliminate all conflicts.

    You can use a counter, and IID. For your action event -

    System pick Nth instance - PersonObject, InstanceCounter

    After your actions are run for that instance, Add 1 to instance counter. If instance counter = PersonObect.count, set InstanceCouter to 0. One action way to do this is Set InstanceCounter to InstanceCounter=PersonObject.Count?0:InstanceCounter+1

  • Your target/source text should be Test2, and your length should be based on your visible text Test, so you have those swapped. Also, your Test object needs to start out empty. That expression says set Text to whatever the length of Test was originally +1 character, so if your original text starts out already longer than your target text, you won't get the typewriter effect.

  • Use a global variable, or add the persist behavior to an object.

  • Array.At(Array.IndexOf("WeaponName"),1)

  • https://www.dropbox.com/s/mvv1sihhfe9mh ... .capx?dl=0

    As you can see there is work to be done regarding character spacing, but I did add in line breaks for you.

  • Sorry off topic, but this is the literally the greatest thing I've seen lately haha.

  • Got an example capx of what you've done? There are quite a few possibilities and it would be a bit silly just to guess from your description alone.

  • How many json files do you have? Straight forward way is to create a function with an event for each file: if param=0, load a, param=1, load b ect... Might be a bit tedious if you have a ton of files, but you only have to do it once.

    Edit: and then call the function with floor(random ()) for the parameter

    Edit 2: answer below way better.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Positioning by code is much less tedious than you might imagine. Breaking up a string into it's constituent characters into an array is just one single looped event, and placing them all as sprites again is another.

    It gets more complicated when dealing with individual spacing between characters (depending on the width of the character) and line breaks. Those can be handled based on your requirements though.

    Sorry don't have an example for you right now but if you have trouble figuring it out and don't mind waiting I can put one together pretty quick when I get to a computer tomorrow.

  • Create an array, width set to the size of your number pool (100), height and depth 1. Populate the array with the numbers 0-99, an easy way to do this is:

    Repeat Array.Width times - Set Array at loopindex, to loopindex[/code:37glqkyh]
    Now to pick a number out of the array, use a variable (I would make it an instance variable for the array) called PickedIndex. Also one more (global) variable to save the number that got picked.
    
    To pick a number, you can use:
    [code:37glqkyh]Set PickedIndex to floor(random(Array.Width))
    Set PickedNumber to Array.At(PickedIndex)
    Array - Delete Index PickedIndex[/code:37glqkyh]
    
    In summary, this picks an index from the array based on the size of the array (so it works even when it starts shrinking), saves the value at that index, then deletes that index so you won't be able to get that number again next time.
    
    The troublesome part for you now is to create a set of events to determine which object to spawn based on that number (there is probably a better way to do this, but it evades me at the moment). Highly recommend putting this set of events in a function you can call, with the parameter being which object to create. Note this is actually 0-99 now, rather than 1-100. You can do the latter simply by using loopindex+1 instead when populating the array.
    
    To reset the number pool, resize the array to what you want it to and refill it as done above.
  • So non repeating random. This plugin may be of use

    First though, some advice setting up. Are your Sprite objects unique in that they need to be separate objects? This will be significantly simpler if you were able to use one object with 100 different animation frames as opposed to 100 different Sprite objects.

    Otherwise I think you may need an event for each unique object. Roll a value from 1 to 100, if 1, create object a, if 2 create object b, ect...

    Edit: let me know if you want to avoid using plugins, a similar way to get non repeating integers from a range can be done with arrays as well, but it will be more complicated. Still relatively simple if you are comfortable with arrays though.

  • Put your sprites into a family.

    On click button

    Repeat 8 times - create object family.

  • Browser.ExecJS("Date.now()") will give you the system's Unix time in ms.

    To get seconds, divide by 1000 and round. You should save this value to local storage every x seconds, and compare the current Unix time with the saved time upon resuming the game.