CinderFlurry's Forum Posts

  • When you influence an object through events, Construst 2 will prioritize that specific object that you changed in any actions after that.

    So if I change the animation frame of a Sprite after grabbing it's UID, every other action after that will influence that specific sprite even if I want the next action to apply to each sprite.

    Is there a way to tell Construct to focus on all sprites rather than one through an action? Hope I made sense.

  • Scratch that, entirely my fault. I had a different way of randomizing them before and forgot to delete it. Apologies for wasting your time, thank you for your help!

  • Alright, I've changed everything to how you said, but frame 2 is still appearing way more often even though it's 0 and 3 now (3%)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay. Now it's:

    For Each Sprite

    ---- If value random(100) LB: 50 UB: 100 ---> Set frame to 0

    ---- If value random(100) LB: 2 UB: 50 ---> Set frame to 1

    ---- If value random(100) LB: 0 UB: 2 ---> Set frame to 2

    Except, for some reason despite frame 2 having only a 2% chance, it's the one that appears the most. I know it's completely random and there's a chance that it's landed on 0, 1, or 2 for random(100) each time, but that seems unlikely. Any ideas?

  • Let me add on to this, I didn't explain very well.

    I have a set of events that change a sprite's animation frame at the beginning of the layout.

    For this, I have set up:

    'For Each Sprite

    ---if 'random(100)

    ---< Less or equal

    ---50

    ------------------------------->Set Animation Frame 0

    ---if 'random(100)

    ---> Greater or equal

    ---51

    ------------------------------->Set Animation Frame 1

    ---if 'random(100)

    ---<Less or equal

    ---3

    ------------------------------->Set Animation Frame 2

    So, that's a 50% chance for 0, 50% chance for 1 and 3% chance for 2.

    Except that equals 103% and makes no sense. So, I need the 1st and 3rd events to be in between two values so the possible outcome of the random(100) number doesn't overlap. I hope that made sense.

  • Can you please explain how I can convert my earlier method using this?

  • Instead of using the compare two values event:

    if 'random(100)

    < Less or equal

    50'

    (that's a 50% chance for the event to trigger)

    how can I say

    'random(100)

    <Less or equal

    Between 50 and 70'

    To add context, my way of understanding % in construct is by using Compare two values. The setup I just showed involved the construct 2 engine choosing a random number between 0 and 100, and if the number chosen is below or equal to 50, then the event will trigger, thus 50% chance.

    But, what if I want to have it trigger if the number falls between two specific numbers? Such as the 'Between 50 and 70' example I gave.

  • Okay cool! Looks like I got the hang of it, it works flawlessly. Before I'm done, I'd like to confirm something first!

    Since I want both enemies and the player to be sorted, the most compact way of doing that would be to make a ZOrder family and put in all the objects I want to be sorted into that family, and assign the variable to that, rather than doing this ZOrder thing for every single family that needs it, right? Are there any problems that could possibly pop up as a result of that, or am I golden?

  • May I ask what you mean by 'pick them'?

  • Can you please explain in what way I would use this to achieve what I want to do?

  • Alright, it's not an isometric game but it's the best way for me to explain.

    I simply want to make sprites that are closer to the bottom of the screen appear in front of those that are closer to the back.

    So for example, let's say the player walks behind an enemy. The only issue is that if you placed the player after the enemy, it'll make it seem as though the player is walking on the enemies face - in other words the player would be overlapping the enemy even though they should be behind the enemy.

    I've tried:

    If Enemies(family) Y < Enemies(family).Y

    • -> Enemies(family) Z order Move in front of enemies.

    If Enemies(family) Y > Enemies(family).Y

    • -> Enemies(family) Z order Move behind enemies.

    Doesn't work. I assumed maybe it was because the events were applying the same thing to each and every enemy. So, I used 'For Each' after.

    If Enemies(family) Y < Enemies(family).Y

    For each Enemies(family)

    • -> Enemies(family) Z order Move in front of enemies.

    If Enemies(family) Y > Enemies(family).Y

    For each Enemies(family)

    • -> Enemies(family) Z order Move behind enemies.

    Didn't work. I don't know where to go from this point, does anyone have any ideas?

  • Ahhh so complicated, I can't seem to make sense of it! I don't understand the whole token thing, what is a token? And then it gets even more crazy with the 3rd event! I'm sorry for taking up your time, but do you think you could explain more in-depth for me? I want to learn

  • I'm following this tutorial: https://www.scirra.com/tutorials/906/mu ... e-5?page=1

    In the conclusion it says: 'If you feel like a challenge, try coming up with a way to private message individual peers in the chat room.'

    This is usually done with /pm or /whisper in most of the games I've played, the only problem is I don't know how to set this up. Obviously it's telling me to figure it out for myself, but it's always good to have some help!

    My idea is to check the chat box to see if it contains '/pm' within it upon hitting Return. But I have no idea how to check this through events. Any ideas?

  • The first method doesn't have anything to do with my issue, and I can't seem to apply the second method, even though it's exactly what I want. (just without the touch part).

  • I'm not using touch controls, but I'll see if I can apply these methods to what I'm trying to do. Still open to solutions!