oosyrag's Forum Posts

  • That is a boolean variable.

    You can find it as a condition under system - is boolean set

  • I began an attempt at implementing steering vectors with the 8direction behavior, but seem to have run into a wall early on. I would expect that the sprite orbits around the target when approaching at an angle, but it intermittently cuts most (but not all) of its horizontal or vertical velocity upon passing the target, but only sometimes... Am I approaching this wrong in the following?

    + System: Every tick

    -> Sprite: Set 8Direction vector X to clamp(-1×abs(Self.8Direction.Maxspeed×cos(angle(Self.X,Self.Y,Target.X,Target.Y))),Self.8Direction.VectorX+Self.8Direction.Acceleration×dt×cos(angle(Self.X,Self.Y,Target.X,Target.Y)),abs(Self.8Direction.Maxspeed×cos(angle(Self.X,Self.Y,Target.X,Target.Y))))

    -> Sprite: Set 8Direction vector Y to clamp(-1×abs(Self.8Direction.Maxspeed×sin(angle(Self.X,Self.Y,Target.X,Target.Y))),Self.8Direction.VectorY+Self.8Direction.Acceleration×dt×sin(angle(Self.X,Self.Y,Target.X,Target.Y)),abs(Self.8Direction.Maxspeed×sin(angle(Self.X,Self.Y,Target.X,Target.Y))))

    dropbox.com/s/yyn5ab25aoq4vfb/steering.c3p

  • All events are 'if' block. There's generally no need to specify else.

    You can add an system condition else, which states that the event will only run if the previous event did not run in and given tick. Also events run top to bottom. The whole sheet is processed every tick, so if your idle animation event is above your other two, it can normally run every tick and will get overwritten by the other animations when those events activate.

    Else is normally used in cases such as toggles, where one event says if x, then change to y, and the following event says if y, then change to x. Since there will both be true, the toggle can never change to y. This can be solved with the else condition.

    You can use JavaScript directly in Construct 3, although in my opinion that kind of defeats the whole point of C3 in the first place. One of the main selling points for me was how logically intuitive the event system was.

  • If the original json wasn't a construct array, you won't be able to load it directly with the array load action. You can definitely parse it with some loops, though I'll need to take a look at the project to see exactly how to do it. Can check it out later today.

  • Oh right, if you want a slider to aim rather than a direct target, lerp will work much better.

  • Set angle to clamp(lowerbound,angle(self.x,self.y,target.x,target.y),upperbound)

    IIRC, angle() returns a value between -180 and 180 with 0 facing right, so take that into account when setting your lower and upper bounds.

  • Normal fonts are vectors, sprite fonts are bitmaps. Normal fonts for Chinese are usually procedurally generated, I'm guessing.

    You can definitely generate Chinese character sprite fonts from a normal font, but loading and referencing such a large file into memory could cause problems.

    There are hacky type solutions out there that only load subsets of the font when required, but I have no idea how to go about implementing such a thing.

    The bigger problem is that no one wants to design a nice looking diablo style font in Chinese for some 20,000 characters (actually 50,000, but most of those never get used).

  • Normally I would first load the data into an array.

    Then you have two options.

    A. Use the advanced random plugin to pick from a set of non repeating numbers associated with the index of your array.

    B. Delete the question out of the array after using it so it can't be picked again.

  • Generally speaking, sprite fonts and Chinese have never worked particularly well together, because generating and processing sprites for 20 thousand characters is not very efficient.

  • You do not have permission to view this post

  • Are you using the viewporttop/left(layer) expressions to position your hud on the correct layer?

    Rather than a video of the problem, it would be more helpful to see the events and project properties. Isolated, if possible.

  • Check your origin imagepoint on your controller's sprite object, to see if it is actually in the middle. If it is off to one side, when you position it, the image will appear of to the side as well.

  • Perhaps you'll have better luck in the scripting sub forum.

    As far as the event editor goes, all instances of any given object are picked by default. Conditions only narrow down the picked list. If you have an action that applies to a sprite object without any conditions regarding that sprite, the action will apply to all instances of that sprite.

    If you mean picking all/multiple sprite objects, then the way to do that via events would be adding them all (or just the ones of interest) to a family.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One way to keep track of player turns is to use "states". You can keep track of the state of the game by using a global variable.

    If you make a global variable called 'PlayerTurn', you can create sub event conditions like after the dice is rolled, pick the player object that is the same as 'PlayerTurn', move it, then increase 'PlayerTurn' by one. Then the next time you roll the dice, it would move the next player object.

    Then add an event to reset the variable back to 1 if it is ever greater than the number of players present, to account for a variable number of players. The total number of players can be set by another variable.

  • If you can clearly identify what you want to happen (actions) and when you want them to happen (conditions), then you will be able to continue putting your events together.

    As for the board, the computer cannot interpret it (spaces, progress) for you, so you'll have to either describe positions through numbers mathematically, or use helper objects. For example, you could use an invisible sprite object called a "space" or "step" and place them where you want them to be on your board. These objects can have an instance variable numbering them in order so that you have a way of identifying each unique space in terms of it's position and progress along the board track.

    This instance variable can also be used as a condition to determine what happens when arriving at that spot.