Yttermayn's Forum Posts

  • Autosave is on, the file I've been working on is a .caproj. Should be nearly instant, right?

  • Thanks, Ill check how it's set up. If it makes any difference, it's whatever the default is.

  • Just got personal edition. How come it takes a lot longer to save a project than it did with the free version?

  • Bought it on steam, don't know how to roll back on that... if its even possible.

  • Same issue.   Particularly sucks because I just bought the personal license in anticipation of the long (American) holiday weekend. Was hoping to get a massive amount of development done. :(

  • Ahh, great idea! By putting my 'prototype' instance of the object I'm working with in a different layout, it is not getting involved in any of the stuff I'm doing with subsequent instances. I was not looking forward to making each event screen out the prototype's UID.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Say your layout has an object. In your event sheet, you destroy that object first thing. Then you create some new objects based on that object. What, if any will the consequences be, if any? Erratic behavior? Nothing? I know that the object will successfully be created and manipulated, but while I'm trying to work out bugs, I want to make sure I didn't create any by doing that. Also, I realize that the IIDs and UIDs may change due to this action, just as they would if I destroyed any other object.

  • LittleStain

    There is more than one collision being checked for in the function.

    Arima

    I originally had been using overlap, but overlap doesn't pick the colliding objects the way that colliding does, which hoses the rest of the script. It's an 'infection' type of script, similar to the 'evil sprite' demo.

    Thank you both. I may have found a solution, though: Making the function enable or disable a group, and within that group is my script. The function also initializes some variables necessary for the script, and checks to see if the group is still running or not, returning an error if it is. This should get close enough to being able to use the script as if it were a true function. I'm debugging it now.

  • I wrote a block that involves some collision based events and once I got it completely working correctly, I tried to turn it into a function. However, C2 balks when I try to drag any events into the function that are triggered by collision. This is a real show-stopper. Is there some way to alleviate this? I don't fully understand C2's objections. All I get by way of error messages is "There can only be one trigger per event branch, so some events could not be moved here."

  • Ooh, ghost. Now THAT looks helpful. Thank you!!!

  • Good info, thanks. I'll see if I can change things around to give the new instance a chance to appear before the check. Ill also look into families. Thank you!

  • Say you are creating and randomly placing several instances of the same base object. How would you detect an overlap between the current (picked) instance and another instance previously placed?

    I tried the obvious condition "Object is overlapping Object" condition, but it never triggers, though overlaps are definitely happening.

    Edit: I should mention that the objects are being created in a loop, so detection should go in there.

  • Is there a way to change the origin during runtime?

  • Ok, so I've figured out a better way to do this, for anyone trying the same thing:

    Forget bordering with sprites.

    Set up an event to test for overlap of your player and your room you want to contain him in. Invert it. Now four lines in this event gets us what we want: 1) start ignoring 8 direction input 2)stop 8 direction 3)move 10 pixels at angle = player.angle+180 4)stop ignoring input

    Now here's the trick, to get it so that the player sprite doesn't completely leave sprite before the event runs, you make the sprite size about twice the size of the actual graphic. So if your player is a 32x32 image, paste it into the center of a 64x64 blank image so he has this empty border around him. Then open that player image up in the C2 image editor. Change the collision polygon into a tiny box or triangle or whatever on the right hand side of the image (since C2 treats the right side as the forward side.) Now exit the image editor. What we've done is put a tiny little spot that moves in advance of the player's sprite that will set off our custom collision detection early, bouncing the player back 10 pixels whenever he tries to leave the containing sprite.

  • This is related to previous discussion here: Invert solid + 8 direction

    Basic thing Im trying to get to work: a randomly generated dungeon made up of decals of premade rooms. Problem: collision detection to keep the player within the rooms.

    People kept saying in the first thread to border the sprite that I want the player to stay on top of with other solid sprites that are pinned to the base sprite. This works great. However, what I didn't say is that this base sprite may have several instances of it spawned at runtime. This would totally blow the bordering method up. Except that I discovered you can make container objects that hold other objects so that they are created, destroyed, and otherwise affected together as if they were one object. Yay! Except there's at least one snag- while angle of the original objects in the container is retained, the position relative to the container object is not! Boo! One of several questions I have is: how can I make that position stay as well? I tried storing the x and y offset in a pair of variables stored in the original solid bordering wall sprite, to be retrieved by each instance of that wall sprite when the instance is created. That works well, until you need more than one wall.

    To make matters worse, there will be more than one kind of room.

    Basically, each wall that is added complicates things, and each new room type multiplies that complexity. The only thing I can think of is that each room type has a several unique wall objects that are unique to that room- so we have massive numbers of objects now, each of which needs to be scripted to grab the positioning data from the original instance.

    Ugggh! Is there a better way to do this?