usbtypec's Forum Posts

  • I don't ususally use Google Fonts so this may not be a big help, but here are some possible reasons / tips:

    1) check to see if the Text object has the Font property set to whatever font you want.

    2) It could perhaps be an issue with Google Fonts. I like to use FontStruct, you can make and download fonts and import as a .ttf file, and I've never had issues with it.

    3) This isn't likely, but it could be an issue with the editor or the device. Maybe the editor doesn't preview correctly?

    Maybe share a screenshot of more details to make it easier to find the problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks yet again dop2000!

  • I don't know why this is happening, you might want to ask some users such as dop2000 or RojoHound about it, perhaps even Ashley if it is an engine bug.

    One idea is that perhaps your layout's assigned event sheet was changed? Check the layout's properties tab and check to make sure it is using the right event sheet.

    Other than that, I don't yet know what the cause could be. Sorry :(

  • So I want to create a sort of background effect that "bends" near the player. My first idea was to use the Bulge effect with a small radius and a negative scale, but then I found out I cannot set the position of the Bulge.

    Is there any way to do this or recreate the effect, maybe using meshes or something?

    Here is an example screenshot of what I want to achieve.

    Tagged:

  • Could you send a screenshot of your events? It's going to be much easier to help you if we can see what your events are.

  • On Right Mouse Click: System -> Create Object -> Fill out parameters

  • This will work as long as Set Angle is enabled for the bullet. If it isn't, use Set Angle of Motion instead.

  • Personally I like to use the physics behavior. It sounds crazy, but it works.

    -Make the enemy physics hitbox a circle

    -Set the enemy physics iterations to something like 2 or 3

    -Set world gravity to 0

    -To move them toward the player, use Set Velocity -> cos(angle(Enemy.X,Enemy.y,player.X,player.Y))*Self.speed for X and sin(angle(Self.X,Self.y,player.X,player.Y))*Self.speed for Y

    Hope this helps!

    EDIT: I am now just seeing you already tried Physics and it was laggy, sorry about that. Although you could try to reduce the physics iterations of enemies, this will make them update less and increase performance.

  • As for the health bar, create a Sprite and call it whatever you want (I'll be referencing it as HealthBar)

    (This method I am using will make a health bar that will shrink as the enemy loses health. There are ways to make it look better but this is the easiest)

    Make sure the origin point of HealthBar in the center.

    Add an instance variable to Enemy and HealthBar called "id". Add a global variable called idTracker.

    Make sure the enemies have an instance variable called "hp" and "maxHP". When an enemy spawns, set its hp and maxHP to whatever health it spawns with. When the enemy takes damage reduce hp but not maxHP.

    Then for events:

    Enemy -> On Created : System -> Spawn Object -> HealthBar (Position: Enemy.X, Enemy.Y-50), then another action -> Enemy -> Set instance variable "id" to idTracker. Then another action -> Add +1 to idTracker (This makes sure every enemy has a unique ID). Then another action -> HealthBar -> Pin to Object -> Enemy. Then another action -> HealthBar -> Set "id" to Enemy.id

    Then on a new event:

    If HealthBar.id = Enemy.id (this should work iirc) : HealthBar -> Set Width -> (Enemy.hp / Enemy.maxHP) * 100 (or replace 100 with whatever width the HealthBar is when full)

    ____________________

    Sorry if this is long or confusing. If you want me to recreate what I just typed above and send you the file, let me know.

    Edit: Fixed a typo

  • What do you mean by individualizing? The "if Enemy.X > Player.X" already check the X of every individual instance of X. There isn't any need to make a unique variable for every enemy. Here's the manual entry on Object Instances. (I think there was a manual entry on intance selecting but I couldn't find it)

  • I've been messing around with your file, and I'm somehow stumped. Something this simple shouldn't be hard.

    If I find a solution, I'll tell you, but for now I've got no idea.

  • Pin is a behavior you can put on an object that will "pin" it to something else, so you can keep it at the same relative location.

    Here is the official manual entry for Pin

  • For the enemies, here is a very simple AI:

    If Enemy.X > Player.X : Enemy -> Simulate Control -> Left

    If Enemy.X < Player.X : Enemy -> Simulate Control -> Right

    Note that this doesn't include jumping, which if you need I can help with that, just let me know.

    _________

    For the Healthbars, try:

    Enemy -> On created : Create Object -> Healthbar. Make sure that the position is Enemy.X, Enemy.Y-50 (Or change 50 to whatever is needed to position it properly), then Healthbar -> Pin to Object -> Enemy (Make sure those two actions are in the same event)

    If you need any more help or want me to create a mock-up and share it with you then let me know.

  • I haven't checked your c3p file yet, but my guess is the order of events is the problem. If I understand correctly, you want to player to pick Object2 (and use 50 opacity) if it is overlapping both.

    Event sheets run from top to bottom, meaning that the easiest way to solve your problem is to do this:

    Player is overlapping Object1 > Set Player Opacity to 10

    Player is overlapping Object2 > Set Player Opacity to 50

    Since Object2 is on the bottom, that means that if it is also run the same time as Object1, it will run last, meaning it would end with 50 opacity.

    Or do you mean second option as in whatever the player collides with second?

  • Currently there is no way to search for specific games in the Arcade, sorry about that. (although I really think they should add it)