randomly's Forum Posts

  • Since I started using SweetAlert2 in the r241, this error appears when trying to add a parameter in the dialogue where you edit the "multiple input" alert.

    Any possibility this will be fixed at some point?

  • [quote:3jmmud05]I've tried by setting the block X value at - "random(20,340)*(loopindex+1)"

    This does sort of work, i'm not sure if its the best way. Is there a better way of doing that?

    Again, that depends on how you want it to look in the end.

    If you just want it to spawn at a random x position, you can simply set X to "random(0,WindowWidth)".

    If you want to spawn the object in the current pattern, but offset by a random amount, add a " + random(-25,25)".

    This will offset the X coordinate by something between -25 and 25.

  • This should work.

    (Was too lazy to create a vertical scroll complete capx, so ignore the "set Bullet.AngleOfMotion". The "Create object" action though should work fine.)

  • [quote:j39svcgn]The two pictures are the same, unless its just me, i can't see anything different between them.

    Sorry about that, screwed something up there, obviously.

    Edited the post, images should be fixed now.

    ________________

    [quote:j39svcgn]How do i set this vertically?

    Please tell me first how you want your items to be spread.

    How are the blocks looking when scrolling vertically?

    Do you want to have the items spawning horizontally or vertically between the blocks?

    _______________________

    [quote:j39svcgn]Sorry about the constant questions

    This is what this forum is for. :)

  • Of wow, the GCD expression will be of huuuuuuge use for me.

    THANKS!

    (this will make some event sheets a lot smaller)

  • You didn't specify how you want your items to spawn.

    This is what you would do if you want to spawn multiple items spread vertically:

    yMin & yMax:

    The items will be evenly spread between those two Y-Coordinates.

    __________________________

    If you want to spread them evenly horizontally between two blocks:

    Remember though that it will look awkward if the space between the blocks are too small for the amount of items you want to fit in.

    So make sure to set the "rndm < 1" condition to a high enough value or decrease the SpawnCount or[/] decrease the item size if it does look awkward.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:1vp0333o]when i press button i want to spawn 5 bullets all that in one press

    When the objects are supposed to spawn, add a condition "Repeat 5 times", under that condition, add the action to spawn the objects.

    Now 5 objects will be created.

    [quote:1vp0333o]can i make the event spawn object global variable

    You can't create variables when running the program.

    But there are enough other ways to get to your goal.

    If you describe your problem more detailed, we might be able to help you with that.

    [quote:1vp0333o]how to make the bullet when collision with another object to increase my bullet like a spawn 5 bullet in on e press when any bullet collision whith specific object make my bullet to 6 in the next press key

    Add a variable called e.g. "bulletSpawn".

    use that for the number of repeats for the spawning action.

    When you want to change the number of spawned objects, simply set the variable to a different number.

    Or

    You can create a function which repeats the spawning as many times as the Function parameter.

    ("Repeat [Function.Param(0)] times")

  • You do not have permission to view this post

  • [armor] - [dmg] * multiplier

    Set the multiplier to 0.2 to only use 20% of the damage.

    Use 0.5 to use 50%.

  • Judging from the error message, this looks like C2 doesn't have the needed rights to save the project.

    Try to save to the user folder (usually C:\Users[Username]) or to the Desktop.

    If that doesn't work, try to remove the ' in your file (=project) name.

    Special characters some times screw up saving processes.

    If that doesn't work either, you will need to upload your .capx.

    (always do this, no matter what. It will help you get to a solution)

    We will need to see whether it is your PC (or capx) and whether we can save it.

  • I recommend rexrainbow 's XOR encryption.

    You encrypt and decrypt with a password.

    In your case, you could choose anything, just make sure to minify the script, so no-one can read the password from your sourcefiles.

  • (Added "destroy after leaving layout" so you don't have infinite block and item instances)

    Change "rndm < 1" to whatever value you like for the time in between the blocks

    I'd also exchange the "Bullet" behavior with something like "Every dt seconds" -> "Block: Set X: Self.X - 1".

    That will make the movement look a lot smoother.

  • Just looked through your .capx.

    The issue doesn't lie in the destroy-event.

    It lies in the conditions that subtract the health from the enemies.

    Those trigger for every enemy, and that is the problem.

    Usually, you choose a "on collision" event. This automatically picks the enemy that has been colliding with the bullet.

    But since you are checking for collisions with the hitbox and not the enemy, all enemies are selected and thus, the health is subtracted for every enemy.

    This fixes it:

  • I'm happy to have helped, that's all. A Thank you is all I need to be happy.