oosyrag's Forum Posts

  • If you're setting up a function (decidedly a good idea) for creating hitboxes, you'll probably be able to use a single hitbox object and function for everything, including ground attack, air attack, and for every different characters and all kinds of attacks. This would simplify your events for what happens when an enemy overlaps a hitbox as well.

    You'll want a createHitbox function that you can enter the parameters X Offset, Y Offset, X Size, and Y Size (possibly add damage, knockback, and other potential values as parameters and hitbox instance variables). You'll even be able to run this multiple times to create hitboxes of varying shapes and sizes that don't have to be perfect rectangles and can have different properties, like the tip of a spear doing more damage than the shaft.

  • On the right frame, create hitbox, set position, set size, and optionally pin to character. Destroy it on the end frame.

    dropbox.com/s/fnuh7n3cipkil6i/hitboxexample.c3p

  • Not sure if it will help in your situation specifically, but I find in general when building an animation system it helps to keep track of "animation state" in a variable, and set animations based on that variable. This will prevent issues occurring from attempting to set different animations from different events and conditions in one tick. The variable can only be one thing at a time, so only one "set animation" action can run per tick.

  • The system unload action are for memory management and clearing textures that are not currently in use from vram. As started in the manual, this can only be done of there are no instances of the object remaining on the screen and on the tick after the last instance had been destroyed.

    If the object is recreated after being destroyed and unloaded, it will load up the whatever object textures it had before from memory (not vram), including animation frames that were loaded from url before.

    The way to clear the frames, as I mentioned before, is to use the load image from url again, loading an empty image, to overwrite and replace whatever you had previously loaded.

    What is a guess is what you have already set up, which is unclear to me, so sorry if I misunderstood your question, which I understood to be "How do I clear the frames loaded with a URL?"

    Here's an example dropbox.com/s/j2nm4ocxe0w1163/memorymanagementexample.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The method I normally use is to put play sound actions into a sub event that checks if a mute sound variable is true or not before running.

  • Destroying a properly synced object on the host should destroy it for the peers as well. Are you able to recreate this in a minimal project? Could be a bug.

    The other reason would be that you actually had two copies of the same obect overlapping each other. The synced one gets destroyed and leaves the other. The peer should destroy any "orphan" synced objects that already exist on the layout upon joining as a peer.

  • Overwrite it with another load sprite from url action. Can be an updated sprite, or a blank one.

  • Use & in the middle.

    "String"&expression

  • Check out the infinite runner example. editor.construct.net

    Replace the solid tiled background object with a 3dshape object.

    You'll need to adjust the numbers a little bit, since the 3dshape object's origin is always in the center, and the tiled background is set to top left.

  • Use the message system for strings.

    Also in general, consider if something really needs to be synced or not. Often if an instance variable never changes or changes very rarely, it is more suitable to use messages, even for number values. Syncing is best reserved for values that need to be updated pretty much constantly and for values that can take advantage of interpolation.

  • Have the peers send a message to the host.

    Instead of creating the peer object upon peer joining, you can do it on message received instead, with the selection in the message. So on message received, the host will create the player object with the correct peerid and team instance variables with the data available from the message. This will then get synced along with the instance variables to each peer.

  • Oops sorry I thought I replied to this but I guess I didn't hit post. Glad you figured it out, but for the duplicate object issue, the peers should delete the original object placed manually on the layout upon connecting and confirming peer status. Only the host will keep/adopt the original object and sync it to the peers, then create additional synced objects for each peer if necessary.

  • A synced variable must be set by the host, not the peer. Syncing is one way, the host does not receive any data from syncing.

    Also, the peers' character should not exist until after joining the room, the host needs to create it for the peer. The host can then assign the instances variable upon creation. This will allow both the player character and instance variables to be synced to all peers.

  • It's a binary data expression.

    GetBase64

    Return the entire contents of the data buffer encoded as a base64 string. This is useful when binary data must be stored in a text-based format like JSON.

    To load an image into the binary data object, use the AJAX Set response binary action along with the request url action. The url can be acquired from the canvas plugin's SavedImageURL expression.

  • I'm not familiar with the process, but everything you need should be in the binary data object. The canvas object also does have the SavedImageURL expression you can get the canvas contents from in conjunction with the Save Image action.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/binary-data