Calfuso's Forum Posts

  • First of all you don't need parenthesis. You use them to group calculations like in math.

    Second thing. Every event is being checked every frame (so approx. 60 times a second). So if you want to trigger this random calculation only once then you have to add an extra check which will determine if this should be ran or not (suggesting a boolean-like variable or a trigger action like "On tap..."). But I have a feeling that the first thing you should read is How Events Work. Then you may want to read about the "hidden" useful functions called System expressions. This should make many things clear for you.

    The Manual has never or will never help me. It's something whit how it's written whit not including all the fact you need and being confusing. If i couldn't understand the manual better i would ask alot less in these forums. I like tutorials though. I want to try the Boolean thing. I made a Boolean and set it to false. Shall i set it to true after the event has happened or what.

  • >

    > > It actually doesn't..

    > >

    > > What do you want to happen at the end of the half a circle?

    > > Should the sprite slowdown and speed up or just change direction while keeping speed?

    > > I guess a little fooling around with the sine behaviour could do the trick..

    > >

    >

    > I want the sprite to turn when it moved a half circle and move a half circle to the other direction. If you don't know what i mean whit a half circle image a rainbows shape. I know that i am probably going to use the Sine behavior i just want to know which offsetts i should use. I know how to make sprite a full circle but not in ahalf circle. Again i want the sprite to move left and rigth in a half circle.

    >

    Did you download the capx I linked?

    Doing it with sine behaviour you would need a horizontal and a vertical one

    make the vertical one half the period of the horizontal and have it start at 1/4 of the period

    make the horizontal a little more than twice the magnitude of the vertical and you're done..

    You could have fiddled with the numbers yourself, offcourse..[/quote It works now. Solved.

  • > triggerChance = 30 (this is some variable)

    >

    > System-> Compare two values (floor(random(101)) <= triggerChance) -> (do whatever you need)

    >

    > In this example you have 30% to trigger actions under this condition. By manipulatin "triggerChance" you can affect the chance in %.

    >

    I am going to reply to both answers. I was suprised by it existing a choosable expression called random. I thaugth no thing existed. That's a interesting thing about Construct 2. You doesn't seem to have that many options at first glance but you really have if you look into it. I was sucessfull in creating a random expression but i got into problems on the trigger chance part. I name my random instance variable random and set it to number and make the number 101. The second variable is called triggerchance and is also a number whit the number 30. Is that rigth or not? Then whit compare two values. On the first value i try to write it like you did it. Is floor the eqvivaluent of the sprite the random event is going to happen whit? So should i first write in the sprites name, then the number and the random expression? I try to do it like you wrote but it doesn't work. Do you need such a complex text on the first value. Can i just not just write down the name of the values?

    '

    I just wrote in "(random)" as a first value and "(triggerchance)" and less then and it worked. The question is, should i make the event after the compare two values thing or should the compare two values thing be a seperate event. Becuase i made the event afterwards and it happened all the time instead of at random. I choosed less then, is that wrong? Should i make the random expression and then the random event and the compare two values as a seperate event. Was my naming of the values wrong. I know i am talking very advanced know and you may not understand what i mean.

  • triggerChance = 30 (this is some variable)

    System-> Compare two values (floor(random(101)) <= triggerChance) -> (do whatever you need)

    In this example you have 30% to trigger actions under this condition. By manipulatin "triggerChance" you can affect the chance in %.

    I am going to reply to both answers. I was suprised by it existing a choosable expression called random. I thaugth no thing existed. That's a interesting thing about Construct 2. You doesn't seem to have that many options at first glance but you really have if you look into it. I was sucessfull in creating a random expression but i got into problems on the trigger chance part. I name my random instance variable random and set it to number and make the number 101. The second variable is called triggerchance and is also a number whit the number 30. Is that rigth or not? Then whit compare two values. On the first value i try to write it like you did it. Is floor the eqvivaluent of the sprite the random event is going to happen whit? So should i first write in the sprites name, then the number and the random expression? I try to do it like you wrote but it doesn't work. Do you need such a complex text on the first value. Can i just not just write down the name of the values?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It actually doesn't..

    What do you want to happen at the end of the half a circle?

    Should the sprite slowdown and speed up or just change direction while keeping speed?

    I guess a little fooling around with the sine behaviour could do the trick..

    I want the sprite to turn when it has moved a half circle and move a half circle to the other direction. If you don't know what i mean whit a half circle imagine a rainbows shape. I know that i am probably going to use the Sine behavior i just want to know which offsetts i should use. I know how to make sprite move in a full circle but not in a half circle. Again i want the sprite to move left and rigth in a half circle.

  • Again, asking alot today. How can i make a enemy go from moving left and rigth to charge to the rigth against the player? I want my enemy to move left and rigth at first but when it sees the player it moves the rigth against it. The problem is that always moves left and rigth even after it has seen the player and doesn't just move the rigth. I suppose you can use Else in some way but Else doesn't work whit much and i can't figure out how.

  • You could try something like this:

    Thanks, it,s solved now.

  • I know that i am asking alot today but i a haven't used Construct 2 in a while so i am eager to get alot of things done today. A conveyer belt is a type of floor that pushes the player in a set direction. If the conveyer belt is moving the opposite direction of the player the player need to move faster then it otherwise it will not be able to move forwards. If the conveyer belt moves in the same direction as the player, the player can gain speed on it. Depending on which games you played your knowledge of a conveyer belt may be different but i hope my explonation was enough. I think you have to make the floor have a accaleration that,s a certain amount you need to pass or something. How do you make a conveyer belt exactly?

  • I have made it so a sprite spawns another sprite when the player comes in it's line of sigth. The problem is that it spawns the sprite thousands of times infinitly when the player is in it's line of sigth instead of just once like it should. How can i make the Line of sigth spawning only happen once?

  • The title explains it all.

  • I have found two choosable instances whit randomness in Construct 2. The first being the random offset on the Sine behavior. The second being Pick random instance. But i can't use these to make the randomness i want. I simply want to know how to make a event happen at random whitout anything triggering it. I also want to know how i affect the chance in % of the random event happening.

  • How can i make a sprite move left and rigth but just rigth when it sees the player? If you make events for both it keeps moving left and rigth even after it seen the player. How can i make it translate from moving left and rigth to moving just rigth. I also want to know how you can alter events depending on which side the player is in contrast to the enemy. I want the enemy to charge to the left if the player is on the left of the enemy and to the rigth if the enemy is to the rigth of the enemy.

  • I have pinned a sprite to another sprite position and angle but when i test the game it appears at another position long above it. Why does it do this? I may share my project if you can't help me whit this information.

  • On collision should only trigger once, for it is a triggered event..

    I changed from overlapping at offset to on collision whit and now it worked. But i have another similiar problem. I have set a sprite to spawn another sprite on line of sigth whit another sprite. The problem is that it doesn't just spawn one sprite, rather one sprite per frame so it spawns alot. How can i make it just spawn one sprite on line of sigth?

  • I kinow that you make the arm a seperate sprite and pin it the body but it,s the the actual stretching i want help whit. The arm shouldn't strtech all out at once. It should strtech little by little. I want a picture of an event sheet since i don't think i will understand just a text explonation.