Phyvo's Recent Forum Activity

  • I think the every X seconds event just doesn't get along with the random function. I'd suggest using this instead:

    Event 1:

    Conditions

    Enemy anim = "Idle"

    AttackType(global Variable)=0

    Actions

    Wait random(3,9) seconds

    Set AttackType=1

    Event 2: unchanged

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah you can make images interact between layers (e.g. collisions and such), but with parallax you get some weird effects... I'm not sure exactly what the math is behind it but I think it stretches/shrinks the x,y plane. Spawning something from a sprite in a normal layer into a parallax layer can cause the spawned object to appear quite a distance away from the original's image point.

    I'm sure you could account for it with some math. A good start would be to use expressions in the expressions panel where you can use sprite.imagepointX(n) and such to reference image points on a sprite and then try some constant multiplier to counteract the effects of the parallax. You can probably circumvent parallax entirely too, that actually might make some of the math a bit easier.

  • Right now I'm using rex's CSV2array plug-in and a spreadsheet program to manage most of my bulky data for similar sprites that require lots of default stats like max HP, speed, etc, especially since I'm using free C2 and don't have families. You can find it here:

    scirra.com/forum/plugin-csv-csv2array_topic46096.html

    So I use CSV2array for stuff that doesn't change in-game and instance variables for everything else with a few global variables sprinkled in for single values like total score or money.

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

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

Phyvo's avatar

Phyvo

Member since 17 Jan, 2013

None one is following Phyvo yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies