caiorosisca's Forum Posts

  • What about dimension of each frame? width x height? Have you tried cropping/trimming the whole animation to see if that helps?

  • Memory wise, scaling down your game wouldn't solve the problem.

    You need to resize your images to a lower resolution,.

    As for render lag I'm not sure, I've made a game once which ran at 60fps on iPad2 and couldn't get over 40fps on iPad3, because of screen resolution(not using C2). Maybe setting a lower window size and scaling it would help? Need to run some tests to find out.

  • How big is your animation? By the way 100 frames is quite a long animation. So it might lag depending on it's size.

  • I'm not sure, but you should check if it's possible to edit containers in runtime.

    If so, you could add your ingredients to the pizza container.

    Just a thought

  • You dont need to set the params when you create the function.

    When you call a function theres a button below the textbox where you write the function name, called "Add parameter".

    So you will do something like this:

    Function > Call "setTextFunc"(txt, X, Y) ....you will need to add 3 parameters here

    Function > On "setTextFunc" > TextBox > Set text to "Function.Param(0)

    TextBox > Set position to (Function.Param(1), Function.Param(2)

  • milk already gave you the solution.

    You need to setup an ImagePoint on the running sprite where you want the splash to be positioned. Also remember to check the origin point of the slashing sprite, these points will overlap when you create the sprite.

    Post a capx if you're still having trouble

  • You create 3 sets <0,a>; <a,b>; <b,100> + if-avaible array at given depth.

    a and b will regulate how often material of given type appears at current depth. If-avaible tells if at current depth it is possible to encounter current material (0 for no 1 for yes).

    t4u What do you mean by "You create 3 sets", can you try to explain me how to achieve it using your way? You can use actual code if that helps, I'm still learning C2 so I struggle a bit trying to organize the code into it.

  • Where did you find the multiplayer template? I see alot of people talking about it, but haven't found it yet.

  • Try it like that, you need 1 boolean variable, can be a player instance var. call it canCreatePlatform for example.

    Player > On Jump> Set canCreatePlatform to true.

    Player > On Jump--------------------------- canCreatePlatform = 1---------> Set canCreatePlatform to 0

    Space pressed ------------------/ Create platform under hero's feet.

    Player > On landed > Set canCreatePlatform to 0

    Platform > On created > Wait 2 seconds.

    Destroy

    As for the scroll, I don't know what is happening. Are you using System> set scroll to object (Hero)??

  • Hmm, I don't think there's much you can do about it. If you need a variable for each resource you will need to do what you are currently doing.

    I don't think I can help you, but I see no reason for not using a dictionary for it, it's organised and not a bad practice to do it like that.

    Just pointing, even when you select the variable from the array you aren't referencing to it, just to the value.

    var1 = 1;

    Array> Set at XY> (0,0) var1; // here the value at array(0,0) is 1

    var1 > set value> 2

    //here var1 = 2, but array(0,0) is still 1

  • I don't really get what you are trying to do, but if you just want to link a resource to a value like

    metal: XXX

    wood: XXX

    cristal: XXX

    why don't you use a dictionary? Try explaining again what you want to achieve, I might be able to help.

    (please tag me in the response)

  • Your welcome, I just like the global object with vars, so I can keep things organized better. Global vars are a pain

  • I see your problem, I'm also very new to construct 2 and using bones animation sounded like a good ideia for me, unfortunatelly I haven't looked at it at all until now. I think as a solution you could pin it to the character and make it run an animation of itselft when you attack (just a quick workaround).

    About layout 2, to be honest I only had a glance at what it was, but haven't looked into it at all. Try making a new layout and copying stuff, so you can find what is bugging it.

    I'm quite sure there's nothing like rep or anything, no need for it tho.

    Have fun

  • Ok, here comes the big text.

    Basically I made a new EventSheet called SwordControl and put some basic stuff in there. I guess that will get you going, You can use my project and complete it with your other stuff.

    You were going to deep where there wasn't much need. Sometime it's simpler than you imagine.

    Something I wrote down while messing with your project:

    Sword > On animation "Throw" finished > Set animation to "Throw"

    This makes no sense. Just set the animation as a loop. (I did it)

    The variable SwordGone is the opposite of HasSword, so there's no need for both of them. It just complicates stuff,

    just use the inverse instead. ( So I deleted SwordGone).

    Collisions get all buggy when you change the polygon shape of an object (especially physics ones), you need to set a single

    collision shape for the whole animation.(preferably all the animations)

    Added

    On start of layout> Sword> Destroy (check SwordControl sheet)

    Change on collision with sword to overlapping (so in case I throw it at my feet, there's no need to move away and back to it).

    I'm using 2 variables to control sword pickup, canPickup is delayed by a half a second to be set to true after the release,

    this way it has time to leave the collision area with the player, otherwise you would pick it up right after release,

    meaning it wouldn't fly away.

    Removed the physics behaviour of the sword, there's no need for it as it already has Bullet behaviour with gravity.

    Also the Pin behaviour doesn't work well when used together/along with physics.

    That's it, let me know if you still need help. Read all the comments on the event sheet to understand what I did.

    ps: just tag me with caiorosisca in case you need an answers. Makes it easier to keep track of the topic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just so you know, I'm having a look at it and trying to solve your problem. Also cleaning it up a bit, so things are easier to understand.

    Will let you know if I get things working.

    Anyway I'll post the result here