Phyvo's Forum Posts

  • People do bump their topics, a little bumping is allowed if it doesn't get out of hand. And yes sub-events within loops are also looped. Sorry I'm late in responding myself, I hope you're not still having trouble but just in case you are I'll try to help.

    Now, it is hard for me to give you a suggestion as to how exactly to create your sequence of actions because you haven't been specific about what you want your objects to do. But I'll try to give you an example for something I know you want to do, I hope it will make the event system slightly clearer to you.

    Say you have an arm moving downwards and you want it to stop at a particular location that's constant for every arm. Create an event for arm with the condition "Arm - Compare Y > (some number)" with an action that sets the speed of the arm to 0. Every time the event sheet loops (which is roughly 60 times a second) the event will "pick" every arm that matches your condition (Y > some number) and set the arm's speed to 0. So even if you had 100 arms hurtling downward the event would only stop the ones that matched the condition (Y > some number). If you had *no* condition (that is used System - Every Tick) then your event would have no filter and thus would constantly stop ALL your arms.

    Again I highly recommend reading the manual concerning how the event system and picking objects work here: scirra.com/manual/75/how-events-work

    Looking at some of the examples that came with Construct and fiddling around with them will probably help you understand this better too.

    If you have further questions please ask them!

  • Haha no that million was a bit of hyperbole. But what's a CSV? Are you talking about the plug-in by rex (http://www.scirra.com/forum/plugin-csv-csv2array_topic46096_page1.html)? I don't recall reading anything about csv in the manual.

    edit:

    After tootling around quite a bit, I'm going to use the CSV->array converter provided by Rex to set up my arrays by making CSVs with a spreadsheet, copying the string into Construct and then importing them (or copying the string to text and opening with my spreadsheet program to edit them. It's probably possible to do a similar thing sans-plug-in but with the plug-in there I'll use it for convenience as I haven't found any compatibility problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello!

    I've never felt forum introductions to be all that necessary but I couldn't leave you in this thread all by yourself! =P

    I've known a bit about it since it was just Construct but I only started seriously using it recently. I had Klik & Play as a kid and while I learned some programming it was never enough to make a game. So I started fiddling around with Construct 2 and having fun just trying to make something that'll be fun to play. Hope you're doing the same!

  • So in my game I'm planning on having a bunch of different weapons that share different statistics, speed, inaccuracy, and so-forth. Because of collision slowdown problems I had I've been forced to make one weapon object for every team (kind of bad because I'd like to have an arbitrary number of teams but it works for now). But to set the proper bullet properties/behaviors for this object each time I create it I need some way to store stats in an array.

    But there's no way to set an array's values easily! You can't do it in the layout and the only way to do it in the event editor is with a million set XY actions that aren't the most readable things! There are external data storage options from XML/webstorage/ajax or JSON (for development) but honestly they seem unnecessarily complicated for what I want to do: have a data set of reference values that never changes that I can easily access in the editor. It feels like it defeats the purposes of a .capx if I have to have another file somewhere on a server just so that I can make editing my array, something that's just a list of lists of numbers, easy.

    Is there really no other solution?

  • It looks to me like it's actually working. When I set the 2nd and 3rd image points to different positions for the basic attack animation (the kick) it launched the body in the correct direction every time. It's just that most of the other animations don't have any image points at all aside from the origin point. Do you really want to have different launch angles for every frame of every animation? It seems like a lot of extra work, especially if you want to change something later, you'd have to edit every frame of an animation all over again. Personally I would avoid using image points altogether and set the launch angle based on what animation is playing using a variable.

  • If you put the mask on top the "front" background image I think the "destination out" blend mode will do the job as it will make transparent the mask itself and all the parts it overlaps while leaving the background alone.

    If you want the mask to be underneath your background image in the z-order I think "source in" will do the trick.

  • Yes!

    Create the object at the point you want its image point to be. Now rotate your object 180 degrees and set its position to object.ImagePointX(number) and object.ImagePointY(number). Now rotate it another 180 degrees back to normal. Now its image point is at the exact coordinate where you originally created the object.

    If you're going to be creating more than one of this kind of object it'll be important that you don't muck up the positions of your other objects while doing this, in that case move rotations and position setting to an "object - on created" event so that the event system is only picking the object you just created.

  • Well, I apologize for providing incomplete/incorrect information, I guess I don't know everything... yet! =)

  • EDIT:

    Sorry, I haven't worked with the drag and drop behavior that much and I think my advice was unhelpful as a result as there are no dragdrop "events" necessary to initiate the dragging.

    I think families are your best bet. You shouldn't need to create more than one unless the objects you're draggign/dropping aren't all sprites as the family should be able to be all inclusive I think. I'm not sure how behavior triggers and actions work with families because I can't make an example capx with the free version of Construct. But when you want to disable the behavior you should try adding a "family is on layer X" condition with a dragdrop "family - set dragdrop disabled" action.

    Again, sorry I started off on the wrong track, if I could help you more with families I would.

  • Construct isn't equipped to do online multiplayer games. Though it can communicate with a server it doesn't do so in a way that can run a multiplayer game. You *can* create a multiplayer game where the players are at using the same computer, but that's it.

  • The loop runs all iterations at once in the same tick, including sub events. Moreover the wait action in a loop operates in parallel, not in a series, as it has no effect on any actions except those that come after it in it's own event (not even those in subsequent sub events are affected). Currently your wait action is only affecting the 3 subsequent actions and since the loop runs all iterations immediately those 3 actions happen all at the same time for all the arms.

    I highly suggest reading through the manual, specifically the section on the event system and how objects are picked. For instance it looks like you're trying to set each arm to a random arm animation but what you're actually doing is setting them all to the same random arm. And you probably want to use instance variables, not global variables, for properties of turning your arms around.

    Also keep in mind that for a lot of this stuff you don't even need the for loop. The event sheet itself is checked every tick and acts as a kind of big loop so even events like "arm.X > globalvariable" will be checked every tick and run if the conditions match, and the picking system will automatically pick only those instances of arm for which the conditions are true (starting with all instances of arm and then eliminating those that do not match the conditions).

  • Did you give the player the jump through or solid behaviors? The player does not need either to jump around on platforms, they're designed mainly for the platforms. The player only really needs the platform behavior and two objects with just the platform behavior will overlap just fine.

  • Yes. You should try moving the blocks with standard events (there are actions for moving sprite objects there). If those are not flexible enough you can add the custom movement behavior to your blocks and use actions from that behavior for easier angle/velocity/acceleration effects.

  • The best thing to do would probably be to not use the layout brightness effect. Instead, use two layers and give one of them brightness effect (probably the bottom one). Put all the objects that should be changed in the changed layer and put the object that should be unaffected in the normal layer.

  • Wait is a bit of a funny beast and takes some getting used to.

    The easiest thing for you to do is probably to put all your actions after the wait into a "function called" event. This allows you to check your variables *after* the wait using your function event. Then in the event with the wait in it call the function after the wait.