BigBuckBunny's Forum Posts

  • If you add a On touched object condition, you can select the touch type (start or end) when inserting the condition.

    Make sure you are using "On touched object", and not other conditions like "On tap object"

    Here's the manual link about it.

  • That's called "color bleeding". Ashley made a good post about it, check it out :)

  • Hi all!

    I'm trying to add a script dependency to my addon. I'm using the addon sdk1 for now.

    Following the manual, these are the steps I took:

    1. Added the dependency script in \c3runtime folder
    2. Specified the dependency in the behavior info using this._info.AddFileDependency
    3. Specified the script file in "file-list" inside addon.json

    If I try to call a function from the script, I get an error saying that the function is not defined. However, a console.log inside the script shows up on the browser console, meaning that the script at least is loaded.

    Is there anything I'm doing wrong? (I'm using developer mode btw)

    This is how I add the dependency in behavior.js

    this._info.AddFileDependency(
     {
     filename: "c3runtime/voronoi.js",
     type: "inline-script"
     });
    

    In "file-list" I added "c3runtime/voronoi.js"

    And this is the script i'm tring to use (calling new Voronoi()):

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Local storage has a maximum size limit of 5 MB, which is far too small for storing videos. You could try storing your videos on a server and load them from there.

  • You can add background-image: url('IMAGE URL HERE'); instead of background-color to have an image instead of a solid color as background.

  • 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)

  • 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.