Razertune's Recent Forum Activity

  • Thank you dop2000 ! Your line made me realize my miss. The so called enemies are part of two families. One is used in combination with the array to sort entities based on a "speed" value before combat. The other family is the initial one hosting their instance variables. I just had to change the family to pick instance UID for. The instance variables weren't listed under the speed family.

  • As the title says. More specifically, I'm trying to use the 'Subtract from' tool to subtract a predetermined value that's taken from an instance variable owned by a specific UID.

    I'm trying to come up with the basic structure of a turn-based combat system. Through the use of family, instance variables and an index array I've managed to be able to pick up the current sprite's (enemy) UID. But is it possible to fetch its instance variable value (damage) as the subtraction number?

    Something tells me that it should be feasible within the Value input of the mentioned tool but I'm having difficulties on grasping how to write something past single values gathered from the 'Find expressions' list.

    In my mind: Subtract the value taken from the named instance variable of picked instance UID.

    Also, if there's any handy guide that I can take part of on how to understand and combine lines within the value input that is used within several tools that would also be really appreciated.

  • lionz I tried to set up my idea through a for-each loop while using your proposed X element comparison. It worked but it's hard to tell how far the cycle goes and the numerical sorting didn't turn out reliable.

    However! I played around with the array sort action and just sorted the X axis. It works great now. Primarily it sorts based on Y:0.

    Can't believe I sat all day for a solution just to realize two lines did the work.

    -> SpeedArray: Sort X axis

    -> SpeedArray: Reverse X axis

  • lionz Thank you for the reply.

    Yes there is a 'for each element condition' that I could possibly use for a solution. But my problem is pretty much I have no idea how to refer to the second X element in the array. I've browsed all listed array expressions but my eyes can't find an answer.

  • An array creates a number of X elements and gets them filled with different numerical values. I'm trying to set up a for-each loop that compares the current value with the next coming element. If I can manage to compare X element 0 and 1, I could from there easily save the value of X:0 to a global variable and then transfer that value to a new insert at the back of the array. In this way I believe a single cycle of sorting could be done in order to numerically sort the values from the front in a descending order.

    How do I make an array comparison of element X:0 and X:1 where X:0 is the current value ?

    + SpeedArray: Current value

    Would a while loop be preferable and therefore rather compare only X:0 to every other X element? In that case I assume the "SpeedArray: Current value" event wouldn't work. What would I use then?

    I'm curious to see some array solutions. I'm new to the whole array concept.

  • I thank you both for your takes on my request. It was helpful since I tried to set up both of your solutions but I came up with a third one! I created a family and included the relevant sprites. Whenever one is created, it receives a value to its instance variable based on Family.Count.

  • Hello.

    I'm trying to come up with what I would call the foundation of a turn-based combat system. Specifically one that deals with multiple enemies and even multiple of the same sprite. Unfortunately I'm not entirely sure how to go about it.

    Let me describe my issue with some comparison. When it comes to dealing with sprites in Construct, it's very easy to interact with and affect a unique sprite via built in features such as collision or mouse click. Those choices are easily implemented in combination with "Pick by unique ID".

    But when it comes to a typical RPG turn-based setup, how would I be able to implement a dynamic cycle of highlighted choices based on the spawned enemy sprites (which enemy to attack)? Is it possible to create some sort of temporary list of stored values that includes the sprite's unique ID? I imagine then you could set up some kind of comparison to the list and easily highlight the targetted sprite (and interact with it).

    I'm really hoping someone can show me how to handle a bunch of unique sprites without any visible interaction (e.g. sprite collision or mouse click).

  • Okay! Thanks!

  • Hello!

    I was wondering if you have yet to find a way to bypass your fullscreen issue on starting up the game.

    I'm having the same complication, having the game require a click (keyboard) input in order to set it to fullscreen.

    Would love to hear if there's a fitting solution out there.

    Cheers

  • It worked terrific! Thank you!

  • Hi

    I've been working on the sound part of my game, and thus I've created an options button (only accessible in the main menu) to "toggle on and off" only the sounds that you would call music in the game. I thought it would be possible to go about this by creating a sprite on a global layer that every layout shares. This sprite (GlobalValues) has an instance variable assigned to it simply called music with a value of either 1 or 0. Pressing the button changes the value between 1 and 0.

    Every layout (playable level) has trigger as follows:

    _______________________________________________________________________________

    + System: On start of layout

    ----+ GlobalValues: Music = 0

    -----> (no actions)

    ----+ GlobalValues: Music = 1

    --------+ Audio: [X] Tag "Music" is playing

    ---------> System: Wait 1.0 seconds

    ---------> Audio: Play Stage.webm looping at volume -10 dB (tag "Music")

    _______________________________________________________________________________

    Apparentely this doesn't seem to work as expected on the start of layout with the GlobalValues variable music assigned with 0. Is it possible to create conditions based on global sprite variables (in this case on the start of layout) or am I just missing something in my framing of conditions?

    If I seem to complicate the whole concept of disabling music, do tell me if there's a better way to go about it.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So apparently if I highlight a sprite and change its layer to a global one and then click away the highlight. Then highlighting it again and change it to a non-global layer, the sprite disappears and only remains within the global layout.

Razertune's avatar

Razertune

Member since 16 Mar, 2020

None one is following Razertune yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies