jobel's Forum Posts

  • well the further you click away the faster the player moves along the X... so it must be redrawing it inside the wall since you aren't using a behavior like CustomMovement, meaning it's happening before the other behavior logic.

    so yes limiting the x to a certain amount may work.

  • in addition to LittleStain 's solution, I would have the Waypoint.X expire after a certain amount of time..or something like that..

    because if you Touch/Click way across the screen, when you come off the wall (after sliding down it) the player goes rushing over. So maybe OnOverlap Wall you shut off the Waypoint.X lerp logic..

  • By the way, you might want to put your sprites (especially the walls) on pixel coordinates instead of inbetween pixels..

    is that why there's sometimes overlap? I was wondering that..

  • I've been messing around with it... I think it's because of your Waypoint.X The code is still trying to get to the X over and over and is trying to get through the solid..

    I noticed it depends on how far over you click which determines the speed of which it shoots up the right side, or shoots down the left side

  • desktop.. yes you shoot up the side, I just thought that was because I had my mouse up..didn't really notice it. but now that you mention it...

    I noticed you have the camera lerping inside fly=1 or fly=0.. I think that should be outside of that logic and should always be happening - meaning the camera should always follow the player no matter what logic happens..

  • the only glitching I see is when you are touching more than 1 solid at a time.. otherwise it seems solid.. (no pun intended)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • do you mean when the player bumps into the brown wall?

  • hey Somebody any ideas on how to achieve a top down shockwave?... I've looked into the warp ripple with lens/glass, but it's not quite right...

  • awesome!

  • It's pretty easy.. there's 2 parts... 1. you write what happens when the function is called.. and 2. then you call it from somewhere.

    to pass it parameters you just add the to the dialogue in the call Action. In your actual function you just reference each parameter using the generic Function.Param() <-- the number signifies which parameter it is.. 1st, 2nd or 3rd.. etc..

  • well it depends on how your game is set up.

    if you have all your enemies off screen for example - in "standby" mode, and they were in a family called Enemies. You could "Pick Random Enemies" which would pick one of them and you could execute your logic from there...

    Another way would be to make a unique animation or frame for each enemy in a single sprite. You'd give it an instance variable called "Type", and that would be which enemy it was.. that would correspond to which animation/or frame you would use.

    Another way that might be best is to just have a function that spawns different enemies based on what you pass to it. So if you had 3 enemies: Imp, Guard, Troll

    you'd do:

    Call Function SpawnRandomEnemy(choose("Imp",Guard","Troll")) //this will pick a random one

    Function SpawnEnemy

    If Function.Param(0) = "Imp" then do Spawn Imp

    If Function.Param(0) = "Guard" then do Spawn Guard

    If Function.Param(0) = "Troll" then do Spawn Troll

  • Instance variables will only be global if you make the object global. Otherwise they will not retain their value between layouts.

    You don't need a built in toggle.. just do this:

    TO MAKE THE OPPOSITE HAPPEN:

    If isMusicOn = "yes" then Set isMusicOn to "no"

    else

    Set isMusicOn to "yes"

    Make sure you are untoggling Silent before you start playing the music.

  • adjust the period offset parameter.

  • you can do it.. but I've read where Ashley warns against this.. saying Text is drawn completely different (very performance heavy) and that you should use Spritefonts whenever you are moving text..

  • oh sorry my bad.. I always mix that up.. you select the sprite you want, then under Size/Position you will see pick nearest.

    otaconnor you should do one of the "picking" tutorials, it will help you understand it better..