artbava's Forum Posts

  • Here you go! Also with capx included.

    https://www.scirra.com/tutorials/474/pa ... e-of-sight

  • Hi,

    I have multiple buttons on a menu screen which i want to toggle them on and off. To do this I would like to use only two sprites for all of them, one sprite with "on" and the other with "off". The thing is that this sprites may appear on three or more buttons at the same time on the sreen. Is it possible or i'll have to create an "off" and "on" sprites for each button?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow! You are awsome!

    Thank you very much for your time and dedication! This is really very kind of you!

    Best wishes!

  • Korbaach,

    Thank you very much for this nice and good looking answer! I really appreciated! Will help me a lot!

    I just don't get the [quote:21z4b7qh]..but

    ...I think the better solution would be to compare distance between Touch Start X,Y and Touch End X,Y....

    Do they not refer to the same procedure? [quote:21z4b7qh]add variable StartX

    ........-II-..........StartY

    On Touch start.. Set StartX to Ball.X

    .............................Set StartY to Ball.Y

    On Touch end...

    ..System compare two values: distance(StartX.StartY,Ball.X,Ball.Y)>some value...do something

    Else...do something else..

    I'm sorry, did i miss something?

    Regards!

  • In my game the players use touch to move a ball around.

    There is an event:

    on any touch end > apply physics force (acceleration) at angle Touch.AngleAt(0) at image point 0

    but if the player accidentally tap on the sreen or the swipe movement is weak the ball barely moves, i wish that in both cases it didn't count as a move, and the player being able to try again without loosing his turn.

    If i could measure the travelled distance of the ball, or compare the object position before and after the touch i could solve this problem.

    I know that bullet behavior has this expression (travelled distance), but this behavior don't fit on my game purposes. Is there a way to measure the travelled distance of the ball?

    Thanks.

  • Thanks antares,

    I'd tried it already. I'd tried to use a boolean variable, but the problem is how to avoid one for playing in the other turn. I've created groups to activate/deactivate each time. But i think i'll have to reorganize my events order to make it work properly. The thing is, i know there must be a much simpler way to do this, but i didn't realize it yet.

  • I'm making a game to be played by two players. Player vs. CPU or player versus player. Since each player may have 1, 2 or 3 moves per round, depending on the previous choice that was made, how can I make every player has his turn to play?

  • I've tested on an Iphone and it plays all the sounds. I've read that sounds still not working properly in WP8.1...but i'll do what you suggested, and wait for WP10 update. Hope it will work then. Thank you very much for your time and attention!

  • Ok, i'll try. Sry if i didn't fully understand what you've done (there is 3 columns not 2 as i've said ). I'm trying...lol! And i will also try to filter the angles while creating the array. Thanks again!!

  • Thank you very much LittleStain,

    I've noticed that the column 2 is also to be ignored, as it isn't between the priority range 270 <=> 90, sry for that. But anyways, it is working as it supposed to! You're awsome! I just have to make little adjustments to it.

    In the capx you've sent me, there is only two columns on the array, but if there is more and one of them should be rejected as it does not met the 270<=>90 degrees? How can i select just the "right" columns?

    I do not want to ask too much of you. You've already did an immense contribution, but if you may still help me with this, it will be very nice.

    Thank you again!

  • Thanks for the reply!

    Do you mean m4a? Cause if it is, it is already on my project sounds folder, but it just not playing on my WP8.1.

  • An AI player search for spaces between obstacles to shoot at, looking 360 degrees (step 2 degrees) around and then generating the map bellow, which have been stored in an array. So the columns represent the range of the angles that he found.

    This is the possible angles that an AI can choose from to shoot avoiding the obstacles. I wisht it could choose angles preferably between 270 <=> 90 degrees, if it is possible. And that the choosen angle may be the middle ones.

    Ex.:

    • In column 0, he should pick 34 or 36 degrees
    • The column 1 did not met the 270 <=> 90 degrees condition, so it is ignored for now (until it don't have other option)
    • In column 2, he should pick 212 or 214 degrees

    According to this example, it will remain with the (34) or (36) and (212) or (214), which he should pick one of them randomly and finally shoot in that angle.

    I've tried to figure out a code for this, but without success. May someone please can help me with that?

    Thanks!

  • Thank you very much SamRock for your answer!

    I have a windows phone 8.1, but the update is not yet available in my country. Soon it will be, i'm sure. But for now i can't test my game sounds. My WP8.1 do not play any sounds at all! I'm not sure, but i think that the problem is WP8.1 can't play any of the default sounds created by C2. Isn't it? So i'll be glad if WP10 could. Do you know if WP10 will play game sounds properly? Or we will need a workaround like this?

    Btw, i never tried this Universal Export you mention. I'll take a look at it.

    Thanks again!

  • +1 for printing option. It will be handy If you could analyze, sketch, organize, add or remove things to your project, before making changes to the code.

  • jojoe,

    Thanks for your reply! I'm already using Array's for each, but thank you anyway. No worries!