BigBuckBunny's Recent Forum Activity

  • I played around a bit with this. You can get the tag position and size with this code:

    Just make sure that there are no problems related to viewport / scaling with your project settings.

    Project link: dropbox.com/scl/fi/rvxk5xstleim7wrtdzsf8/Tag-position-in-html.c3p

  • Can you give me an example of your text?

  • For your first question, make sure to tick "Allow context menu" in the HTML object menu.

    For your second question, use Text.TagX(tag, index) Text.TagY(tag, index)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Honestly I needed this to have control over the UVs of each point, since as far as I know the built-in mesh is the only way to specify the sampling coordinates of the texture.

    It would be nice to be able to specify UVs when rendering quads or convex polygons, but that doesn't seem to be supported.

  • Good to know, thank you. I guess that means that there isn't a way to manually allow a certain plugin to use meshes for now (e.g.: by specifiying some plugin _info) (?)

  • Hi all!

    I'm trying to make a drawing plugin using the addon SDK v1. I want to be able to modify the mesh of the instances of my object type at runtime. To do this, i created a mesh using wi.CreateMesh(2,2).

    When this method is called, i receive the error "object does not support mesh". Digging a bit into the worldinfo.js code i find this:

    CreateMesh(t, e) {
     if (t = Math.floor(t),
     e = Math.floor(e),
     !this.GetInstance().GetPlugin().SupportsMesh())
     throw new Error("object does not support mesh");
     this.ReleaseMesh(),
     this._meshInfo = {
     sourceMesh: C3.New(C3.Gfx.Mesh, t, e),
     transformedMesh: C3.New(C3.Gfx.Mesh, t, e),
     meshPoly: null
     }
     }
    

    So it seems that the plugin itself has a flag that tells Construct if its objects support mesh or not. However, i can't find anything in the docs related to this. Is it possible to allow a custom object type to use meshes?

    Doing the same thing using a behavior on a sprite works since the sprite object by defaults allows the usage of meshes, so I wonder how i can achieve the same thing, but without a behavior and on a custom drawing plugin.

  • The closest you can get to achieving this without delving into complex js scripting involving the Web Audio API and audio file formats is by using the Video Recorder plugin. You can record the modified audio as it plays and then trigger the download by passing VideoRecorder.RecordingURL as the URL.

    Here's how to do it:

  • Hi! By looking at your code, i suppose that the problems are:

    1. The crosshair at (0,0) is the PC crosshair. In the cursor controls group you set the PC crosshair position to (mouse.x , mouse.y), however on mobile these expressions default to zero (since you don't use a mouse on mobile devices).

    2. the touch crosshair position is reset when the joystick is dropped, but in your events you move it every tick whithout checking if you're actually using the joystick or not.

    To fix 1. use the PlatformInfo plugin to detect wether you are on PC or on mobile. If you are on mobile, delete the PC crosshair.

    To fix 2. ensure that you are dragging the joystick before moving the crosshair (just add a is Dragging Joystick condition on the first event on joystick controls).

    Hope this helps.

  • Using a second tilemap is a good idea actually. Comparing the tile number at a position is a O(1) operation, and that's optimal performance wise. In your events you would then check the number of the tile underneath the player to determine which sound to play.

    The only downside may be that you basically need to have a whole second copy of your main map as a tilemap, which increases memory usage, but I wouldn't worry too much about that, unless your map is really huge and your tiles are relatively small.

  • I took a look too. I'm 100% sure that the problem is that the enemies in the previous room can't find a path to the player, hence they get stuck in place.

    I don't really know how Construct handles pathfinding maps between instances of the same object type, but I suppose that after a door is destroyed, all enemies still use the old map with the door still present.

    I fixed your issue by adding a global boolean DoorRecentlyUnlocked which I set to true when a door is destroyed. Then, when an enemy is created (using On created enemies), if DoorRecentlyUnlocked is true I update the whole obstacle map using Regenerate pathfinding obstacle map and set DoorRecentlyUnlocked to false prevent unnecessary calculations. Give it a try :)

  • Set the sprite opacity to 100% and set the layer opacity to 35% instead. That should work.

BigBuckBunny's avatar

BigBuckBunny

Member since 14 Oct, 2018

Twitter
BigBuckBunny has 1 followers

Trophy Case

  • 6-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies