DogeDev's Recent Forum Activity

  • If every enemy should have a pistol, add them to a container. Then the code will be very simple:

    On every tick - Pistol set position to Enemy.imagePointX("gun"),Enemy.imagePointY("gun")

    You won't need "For each" loop, won't need to link them by UID.

    Thanks a lot bro! It work!

  • > On Enemy destroyed
    Repeat 10 times
    	Create Cube at (Enemy.x+random(-50,50), Enemy.y+random(-50,50))
    	Cube disable physics collision with Cube
    	Cube set scale to random(0.5, 1.5)
    	Cube apply impulse random(1,2) at angle random(200,340)
    	Cube set angular velocity to random(-300,300)
    	... etc.
    

    Of course, you will need to experiment with all these values and Physics settings (density, damping etc.)

    And, sorry for asking again bro, but, you're so helpful for me in all my threads, so, you can see my new problem that i posted in the forum? I really don't know how to fix it.

  • > On Enemy destroyed
    Repeat 10 times
    	Create Cube at (Enemy.x+random(-50,50), Enemy.y+random(-50,50))
    	Cube disable physics collision with Cube
    	Cube set scale to random(0.5, 1.5)
    	Cube apply impulse random(1,2) at angle random(200,340)
    	Cube set angular velocity to random(-300,300)
    	... etc.
    

    Of course, you will need to experiment with all these values and Physics settings (density, damping etc.)

    Thanks man, and yes, i just mess with everything changing all values to see what happens while i'm having some fun xd and to know if is it good or not.

  • My own version of what? What have you tried?

    If you want to try Physics - create a number of cubes in a loop, for each cube set random scale, apply random impulse at random angle, random torque or angular velocity.

    Your version of the code, an exemple of the effect in the video for me, just to see the method you'll use.

  • Ay bois, in my game, you need to shoot some cubes to get money and some other things. The problem here is, when one enemy spawn, he will spawn with an pistol, and, the code that i made works perfectly with the position of it. BUT, when another enemy spawns, his pistol will glitch, and, lock in the place where he just spawned. So, if i have more than 1 enemy spawned, the pistol of the 2 enemy and above will glitch and lock, i tried using UID, but, didn't worked, i tried using iid, and, worked perfectly, BUT, when you kill one cube, everything screws off, i tried using my own created ID, but, like the UID, it glitches anyway. I tried using everything that i thinked, but, i don't know if is an wrong position of the code( lol what a coicidence in event sheet too. ), or the code is wrong, i'm using for each but, it seems to not work too. Please, if you know how to fix it, tell me!

    Code: imgur.com/a/psf4B6h

    Error: imgur.com/a/qmjLe8N

  • Try Physics. Disable cubes collisions with other cubes, they should only collide with the immovable ground.

    Or you can use Bullet behavior with gravity and Bounce off solids=yes. On Collision with the ground reduce bullet speed. It will not look that nice, but should have better performance.

    Oh, k, thanks, but, sorry for asking more again, but, you could make your own version? Like, everything i made is not that 70%, so, your code should be better in perfomance than me, or just in another way, for me to see will be better, and thanks again for helping me!

  • A big disadvantage of Particles object is that particles don't rotate. I imagine that for this effect OP wants cubes to rotate.

    Hey bro, sorry for asking to much, but, i liked the effect that code gives, but, it's possible to make an effect like in this video when the enemy dies? ( Will be playing at an custom time )

    Link: youtu.be/gzPGmR6R67Y

  • Ay bois, so, my problem here is, how i create an leaderboard in the nem Scirra Arcade? It's possible to create one in the new Scirra Arcade? I knowed how to create leaderboards in the old arcade, and, i know how to use the plugin, but, in this new arcade, how did i create one?

  • You can't use "Wait" or "Every X seconds" with values smaller than 0.016, because your events run only 60 times per second (not 1000 times).

    Edit: sorry, didn't see jobel's comment.

    Just use time or dt expressions.

    https://howtoconstructdemos.com/simple-stopwatch/

    Thanks a lot for the link bro!

  • I think your intervals are too small.

    0.001 is basically no time at all. Most finely tuned games have 20 millisecond latency built in, and that feels instantaneous! Construct I think updates each tick within and up to 16 milliseconds.

    Every 0.001 seconds will not run accurately as far as I know since Every Tick won't even run that fast.

    Didn't know that, thanks man!

  • > On Enemy destroyed
    Repeat 10 times
    	Create Cube at (Enemy.x+random(-50,50), Enemy.y+random(-50,50))
    

    You can add Bullet, Fade, Rotate behaviors to cubes and after creating each cube set random values for bullet speed, angle of motion, rotation speed etc.

    Thanks, that worked!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ay bois, i'm making for fun an hard dodge game, that you need to dodge and survive to get the max time you achieve, but, i have an delay with my timer:

    I setup for every 0.001 seconds to add 1 to Miliseconds, and, when he achives 9 miliseconds, will add 1 to 10Miliseconds, but, instead at adding 1 in the right speed, it just slow ( a lot ), so, if someone can help me, please, how do i fix this?

    Timer: imgur.com/a/M58LsQ5

    Code: imgur.com/a/K4LSkoP

    I tried removing the wait just to see if i got something, but, it's just the same speed.

DogeDev's avatar

DogeDev

Member since 15 Mar, 2017

Twitter
DogeDev has 5 followers

Trophy Case

  • 7-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x3
    Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies