lionz's Forum Posts

  • Put enemy and gun in a 'container'. Check the manual.

  • Sure then try the above. Every tick isn't going to work nor is it needed here. You can run events based on animations finishing. There is also a Timer behaviour option but I think anim events could work for now, try it.

  • I made use of an array or the array file which basically is a spreadsheet. Then using a global variable you can switch between a column for each language. Then the rows represent the same dialogue but in different languages across. An excel file could be used outside of Construct then imported and used in the array also, but I used the array file within Construct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because what you're describing is animation based, at a basic level you can make use of 'on animation finished', so 'on Idle animation finished' set animation to hop. 'on hop animation finished' set animation to idle, to flick between them.

    The problem here is when you say hop to the left it sounds like movement and with that logic he won't move so it's up to you how much he moves. What does hop once mean in context of your platformer ? He moves a little bit and plays hop ?

    If he moves only when the hop anim plays one time then you could still make use of animation events, so 'is hop animation playing' then simulate control on the frog.

  • Are you asking how to make a HUD that scrolls with the player? You can put the UI on its own layer that doesn't scroll, set parallax to 0,0

  • Yeah I've had zero luck with this also. What lionz recommends sets the angle of the bullet SPRITE, but does not change the angle of motion.

    If you try to change the angle of motion, the script only allows for a single number (angle), and won't let you input Mouse.X and Mouse.Y.

    It seems that spawning a bullet, the bullet will match the angle of the object that spawned it and travel in the direction (that's how it works in the Ghost Hunt tutorial). I've yet to figure out how to take a stationary object and spawn a bullet that flies towards the pointer.

    What I suggested works if you have 'set angle' ticked on the bullet properties, which is the default. If you unticked then it won't work, it will just change the angle of the object and not the angle of motion with it.

  • On the action where you spawn the bullet, add another action using the bullet object 'set angle toward position' and set the values to mouse.x and mouse.y. You will need to add the Mouse object to the project also before doing this.

  • It's under System and you must be clicking on the left side of the event sheet (conditions)

  • Looks like you used the wrong value in pick instance condition, should be the parameter instead of enemy_2d_scrolling.UID. I can't see the function call but I assume so from the logic. BTW you don't need that old condition anymore as they made an update so it keeps the picked instance through the function so it will be the same enemy that was picked on function call, just make sure 'copy picked' is ticked.

  • I think I recall now you created the parameters on the function CALL in C2, but in C3 you do it on the actual function. That should help with at least one of the issues you're having. To choose the parameter in the action rather than use the old way function.param(0), the parameter name simply appears in the list and looks like a variable.

  • I mean in general what are you trying to do with that function? It runs when the character is hit I guess? So you have an event 'bullet on collision with player' (or equivalent), then the function is called on the right as an action. In C3 you can right click on the function itself and you can add the parameters there. Then when you call the function in an action you will see the parameters where you can send player.health through or whatever you need.

  • Can you try it in C3 and then show us where it's going wrong? This is ancient now. If you are trying to apply things to an enemy on hit, now you call the function as an action and the enemy you hit remains picked inside the function.

  • You do not have permission to view this post

  • This is the problem with using premade files I guess. You'd have to share the file. Could be a pin to imagepoint problem and you moved the imagepoint.

  • Which condition did you use? 'Cursor is over object' should pick the correct one.