dreaa's Forum Posts

  • Hello,

    I am kinda stuck (again .. ><), I'm doing a board game and I'm stuck about the pieces' deplacements.

    Take a look at this. ( I think you gonna need to open it in full tab)

    On the left you can see the board, ready and prepared for a game. And on the right how it works, so you need to tap the piece you want to move and click on the case it needs to go (both are already scripted and works).

    Now the problem become from the rules, the piece can move from 1 to 1 case and only in 4 directions.

    So I have to create an highlight on neighboor cases so I can tap on it to move the piece. The problem is, I don't know how to create this part, I have already thinking about creating a collision box with a collision box that goes on the other cases, but the problem is I have exceptions (like the cases with no symbols, a piece can't go back in it after exiting) so generate all of them might be rought and long. Same for creating the special collider for the box, kinda ugly x). Like all the solution itself.

    So if anyone of you knows a proper solution, or if there isn't (which I clearly doubt since i'm far to be a genius x) ) just tell me.

    Regards.

  • Oh nice, exactly what I wanted, thank you! Always forgot to use functions ><.

    I needed it to use it in a board game, the animation are the selectable cases and after the move I needed to reset it for the next turn

  • Hello,

    I'm kinda stuck about the parents-children event. I want to play an event AFTER an other one but I don't want it to be limited by the parent system.

    Take a look at the screen to make it easier to understand :

    Here I have an event about the tap gesture on " plateau_cases " and the conditions about it. This one works perfectly, but the problem is about the " for each ", I would like it to apply to ALL the cases I have (48 for the record) but the problem is with the children system it is applied to only the one that has been taped.

    So I've tried to put this out a system of parents-children, but the problem is, it blocks my previous instructions, so the frame start at 0, never change to 1 and it block my game because I need the animation to be played.

    So I need to know, if there is a way to "reset" the cases by putting the frame animation to 0 for each cases without being limited by the only cases that has been taped.

  • Oh ! Thank you, works perfectly <3

  • Oh yeah, way easier with the way you explain it.

    Just a question about this, I want to access to the string, not the number. But when I look in the debugger I see a number, not the real value (like "top").

    Just like the screens shows :

  • It's not really what I'm looking for.

    I have a list with height directions that I need to attribute to the variable "Value" for each pieces of my sprite, but the problem is I need to attriburte the direction only 1 time

  • Well i found the loop, I'll just use the for each instance, which works perflectly and it's easy.

    But I still have the problem about the choose, if only a "choose once" could exist haha

  • Hello !

    I am trying to add a random value to a variable. Let me explain more clearly.

    I have a variable " Value " on a sprite, which has to get a random value at the loading of the layout.

    There is where am i at the moment :

    So, it choose an ID between 1 and 8 (there is 8 occurrence). Then it applies to this specific one, one of the value in the choose. From there everything is working.

    My problem is, I need 2 things :

    • A loop (but never used it, so i don't know which one and how to configure it) so I can apply it to every occurrences.
    • Something to put no duplication into it because each value (top ...) as to be attribuate only ONCE (and this is very important).

    After that, I have to do this with an other loop to apply to 8 new occurence (black and white ones) and this one has to have some values multiple times and i'm lost aswell.

    Any helps is welcome!

    Regards.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No that's not what i wanna do, I just want to use ctrl for both colour, ctrl will set blue if the ship is red and it will set red if the ship is blue. And while I was typing my message I just got the reason it wasn't working xD.

    I've done

     if (ship is yellow or red ) do this
    OR
    if (ship is yellow or blue) do that[/code:3gm1el12]
    So yeah it was like " OK it is yellow, but i need to go on blue or red ? I'm fuckin lost u idiot" :c
    
    I'll just have to think which color set in first, maybe on a random it could be nice. I will edit after my tests
    
    EDIT : Yh it's working now, i've set on the first time ctrl is pressed a random color and the state that goes with so it's working perfectly, thanks all for the advices
  • Yeah you have the last version on the link so it's the version with no bug :p.

    But like i've said, i'm wondering if it's possible to do that : (Suppr the shift control and change the ship with just ctrl)

  • BLBLBLBL Working perfectly, thanks guys love u <3

    EDIT : Just wondering, is there a way to put the same control to do the thing. Here i'm using shift + ctrl because using only ctrl is bugging (idk why, it can change only once). It's just to optimize the gameplay, not necessarly at all but it could be nice to fix it

    capx link : drive.google.com/open?id=0B6phdwDtsxJkTXN1RnU3TUYyMDA

  • Fixed the first part (with boolean/shoot and stuff, perfectly working.)

    But, I still have a problem with the scoring. I've tried the else stuff and it's very complicated and I don't understand.

    So i've found an other way to do it. I've added variable named state into my laser and my asteroid. So when i want to score I compare the state of the asteroid and laser.

    So, if laser.state = asteroid.state then it adds +2 ; if it's not equal it adds +1. The +1 thing is working but not the +2.

    The good things is, I know why but I doesn't know how to fix it. When I press "shift" or "ctrl" to set the red/blue color to my ship it is supposed to change the animation of my laser and change the color, it works, but in the same event it's supposed to also change the state of my variable (putting 0 or 1 dependings of the ship color) but it's just never change and I don't get why. :/

    There is a screen of my even sheet and my capx there : drive.google.com/open?id=0B6phdwDtsxJkTXN1RnU3TUYyMDA

  • [quote:36touem4]Suggestion would be to have a "ready" instance boolean or something similar.

    Could you tell me a bit more about this ? Like i said i'm a beginner (this is my first real project) and i've never used booleans on construct 2 so i'm kind of lost :p.

    And i'm very intereset of doing the best I can for this project before I have to get it back

    And about the second part, yh i've changed and put the spawn before setting the animation and it works perfectly. Was kinda confused in my mind.

    I tought it was setting the animation (so the colour) and then create the laser so i tought it would have been more efficient that way, should have tried both way x)

    EDIT : The project : drive.google.com/open?id=0B6phdwDtsxJkTXN1RnU3TUYyMDA

    From this i'm wondering a thing because i'm totally lost in the even sheet. I'm doing the scoring so I want to do some conditions like this

    Laser on collision with asteroid
    {
    if (laser.frame=blue&asteroid.frame=blue)
    add score 2
    
    else if (laser.frame=red&asteroid.frame=red)
    add score 2
    
    else 
    add score 1
    }[/code:36touem4]
    
    I know how to do it with code but not in construct 2 so it kinds of bore me and wondering how to do it ?
  • TheDom

    [quote:31071e0u]Keyboard > ESpace is Down

    (sub event) > Every 0.2 seconds > Ship > Spawn Laser

    ( create a second condition)

    Laser > on created > System wait 0.2 seconds

    Destroy Laser

    I'm not understanding this part. Doing a destroy on laser after 0.2 secs is just making my laser pop and destroy it almost right after.

    For the animation it's barely good, it's working (and was such a stupid mistake x) ) but my animation is waaaay smaller than my original sprite, so we barely see it when it explode.

    EDIT 1 : There is no animation problem, I've made it the way you say (haven't saw before ><), by doing a sprite and now working as hell

    -----------------------------

    Yeah the speed sets was a better idea. I don't get why and where I shall uses the loops ? (I'm a total beginner ^^')

    -----------------------------

    clarkkentnicdao

    Kind of helped me since it gave me an idea which is almost working .

    -----------------------------

    For everyone

    First of all there is my capx at this point drive.google.com/open?id=0B6phdwDtsxJkTXN1RnU3TUYyMDA

    Then my update is, i've found the way of putting the right frame so my red ship shoot red laser, same for blue. But the prob here is the last laser shooted is always yellow, no matter how many lasers i shoot the last one (until i shoot again, then it switch to the ship color)

    So i guess that's because i'm setting the animation when i press space right before it spawns like we can see there (for those who don't want to DL my capx)

  • Hello,

    I have some problems concerning animations in construct 2.

    There is my situation : I have a ship than can shoot laser. This ship has 3 colors which represent 3 states : Yellow red and blue. (It's an Ikaruga like for theses who knows).

    Besides this, there is asteroids that are blue or red. So depending on the states of my ship the player gains more or less points.

    Yellow state is 1 point no matter the color of the asteroid.

    Blue stat is 2 for blue asteroid and 0 for red. Reciprocal for red.

    But this isn't my problem (yet, at least). What I want is when the player press "shit" the ship become blue (done) and when i press ctlr the shipe become red (done aswell).

    BUT. On this I have one big problem and maybe something to optimise the gameplay.

    FIRST PROBLEM : The ship become red or blue but the laser is still yellow, no matter what. (In the debug i've saw that the old laser (already shooted) chance states but not the new one).

    So i need to know how to put red or blue for my laser, dependings of the color of my ship (blue for blue / red for red ofc).

    Then for the optimisation i'm wondering if it's possible to push only ctrl to change the color of my ship (tried but ain't working in the way i found).

    There is some screens to make helps easier for you.

    The settings of my frames. Working in the exact same way for the lasers. (frame 0 = red ; frame 1 = yellow ; frame 2 = blue in the same animation)

    And now my event settings. I have the space key to shoot (it stop the animation so it stays yellow at the beginning since my yellow isn't the last frame). And I have the shit / ctrl pressed where i try to treat my ship + laser in the same way, it works for the ship but not for the laser, so i'm quite lost :/

    ---------------------------------------

    EDIT 1 (06/10) :

    I've worked on something else to wait people to answer and i'm like mind fucked.

    I wanted to put an explosion animation so i've added an animation named explosion and putted multiple explosions in frames so this case is settled. I've added it on my event, when my sprite is destroyed it is supposed to play the animation "explosion" like we can see on screen, but when i'm trying to play it, nothing happening, so i'm lost :/

    Thank you very much