Aphrodite's Forum Posts

  • epicjelly

    https://dl.dropboxusercontent.com/u/100 ... index.html like this sort of I guess (left and right arrows for a epic adventure!!).

    capx (need license because of families): https://dl.dropboxusercontent.com/u/100 ... aring.capx

    capx if you don't have a license (only has black blocks): https://dl.dropboxusercontent.com/u/100 ... amily.capx

    just place the objects in the layout view on the tower, and set the boolean that says if it is in front of the tower or not, and have fun

  • I would say definitelly doable, the position of the objjects are basically angles tranfered to a X value, how to explain... Imagine having the relative angle of the tower you want, in °, put it inside a formula like Radius*cos(angle), and it will be placed, the Z-ordering is more a challenge, as for moving your character, it is just changing the view of the angle, moving the ennemies could be done via a linear interpolation between their angle and their two reference positions.

    a little Chalenging mathematically but doable

    "Yes I think it's just flat blocks but pushing the arrows buttons creates events that resize the blocks."

    I do not see them changing size, only getting darker and hidden by the block in front of them

  • Event 224 of the event sheet 1:

    You are using subevents, sub-events only occurs when the events above them are true, and of course, the variable action of the dog cannot be equal to both "left" and "right" at the same time

    Also try not to use the "Else" condition for instances, since it does not pick the good instances in most cases

    And also, I suggest you not to have too many opened layout and event sheets in the editor, my computer wasn't responding (my computer is bad but it is still one of the cause of regular crashing issue for some users)

  • > Here are the formulas:

    > qarp(a, b, c, t) = lerp(lerp(a,b,t), lerp(b,c,t), t)

    > cubic(a, b, c, d, t) = lerp(qarp(a,b,c,t), qarp(b,c,d,t), t)

    > cosp(a, b, t) = (a+b+(a-b)*cos(t*180))/2

    >

    >

    thanks R0J0hound

    When I've use lerp to move sprites it seems to have built in "slow down" toward the end which is great. If I wanted this "slow down" at the beginning and the ending would I use qarp? (or your lerp(lerp(a,b,t), lerp(b,c,t), t)). I tried it when zooming out the layout and it doesn't seem to work like I expected...still feels like a regular old lerp.. since it starts zooming fast then gradually slows.

    > Set Layout scale to lerp(lerp(LayoutScale,1,0.5*dt), lerp(1,4,0.5*dt), 0.5*dt)           
    [/code:f8psydme]
    
    a=LayoutScale (which starts at 1.3)
    b=1
    c=4 (wasn't sure how steep to make the curve)
    t=0.5*dt
    

    The "built in slowdown" comes from the use of lerp you are using, a is the variant in your case, so you have a "suite arithmétique" (not sure of the english term for that), that will go slower and slower towards the point. (it shouldn't even reach it, I never understood why people are using lerp like this)

    To be exact, lerp(a, b, x) return the value between a and b, corresponding to the percentage (reminder of math: 1 = 100%) x, from a to b

    lerp(a,b, 0) will return a, lerp(a, b, 1) will return b, lerp(a, b, 0.5) will return (a+b)/2.

    The intended use is to make x varie (generally from 0 to 1, but it can go over that), for your zoom, you can have lerp(min value, max value, zoom percentage), and make the zoom percentage varying from 0 to 1 or 1 to 0 as you want it.

    The qarp will be the same logic, but applied not in a linear fashion (a quadratic one, which I think means that a and c will be min and max, but b will be affecting the way it evolves with each values of t)

    qarp (a, b, c, 0) will return a, qarp(a, b, c, 1) will return c, qarp (a, b, c, 0.5) will return ((a+b)/2+(b+c)/2)/2 = ((a+c)/2+b)/2 I think

  • use granpa method but the first condition has to be the System condition "For Each" (with the object that has to be affected)

    Since otherwise not all instance of the object will be used in the "Compare two values"

  • roberto : I think peterbot1970 was referring to a "spread the payment over time, but the same amount at the end", which is similar to what you are suggesting to an extend.

    Which is something I agree for, since Nobody can make money using Free C2, it could be an interresting thing, since even more people could afford to make money while paying less at one time (it is harder to have something like 100€ to keep to pay the program, while beginning to pay for it, and using it is much more affordable I think, since the same price is at the end, just more convienient, just my opinion)

  • maybe you are using animations with too many frames (like, how to explain, 2D video games generally uses not 60 frames at 60 fps for the animation that are clean even paused, but a lot less frames that are designed to be seen in motion only, since they have some blur applied, or other artefacts that looks really good in motion only, and that reproduces the illusion of motion with a lot less ressources)

    EDIT: Of course the 60 frames 60 fps is the worst case scenario, but it seems to be a common mistake.

  • You can do it, they are just here because they are the original files and so if you want to change them, they are here, but keep the original somewhere safe in case you need to modify them later on /!

    EDIT: Delete them from C2's interface itself

  • Normally C2 does a destroy on all non global object after each layout (however if you spawn other object on destroyed, they'll not be erased)

    However it could have changed slightly from the last time I worried about this, so maybe there is a problem indeed

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aphrodite Where would that code even go?

    The "proper way" to do it would be to use a project file (which is actually just a text file containing that code, which is actually a C2 array in a JSON format), to call it using the AJAX object, and to load the Ajax request result inside the array using the array's action "Load".

    https://www.scirra.com/manual/108/array

    https://www.scirra.com/manual/107/ajax

    https://www.scirra.com/manual/141/files

    However it might be a little too much to worry about if you don't know yet how to do all this.

    I suggest you go by setting each value with a "set at X/XY/XYZ" for now, just remember that if your array is not large enough you could have issues(a value outside an array is always 0).

  • When you are using "Compare parameter" (the event), you just have to entre the index of the parameter (0, or 1 or 2, or whatever parameter you want to compare to something).

    So if you set Index to 0, comparison to Equal, and Value to 1 for exemple, the condition will be true if the First parameter (it's zero based..) is equal to 1

    Function.Param(Index) however is the value of the parameter itself, which can be use in various ways inside the function (like inside a math formula, or to pick a particular instance of an object, or to return a particular result)

    In theory you could compare the value of a parameter by using System>Compare Two Values : Function.Param(0) is equal 1

  • You could also do:

    if you don't see exactly:

    First Value:(Sprite.Boolean1 = 1) & (Sprite.Boolean2 = 1) & (Sprite.Boolean3 = 1)

    Is equal to

    Second Value: 1

    (C2's instance variable booleans actually returns 1 if true or 0 if false)

    BlackHornet's method is valid, but if you need to combine OR and AND, it could be pretty annoying to do in blocks at the end if you are good with boolean logic

  • I like the idea of using an instance variable, since they usually keep everything nice and tidy, but every time I try to make an action to change its value, it says that "down" is an unknown expression and "right" "does not take 0 parameters". I think I might be wrong, but I'm supposed to use "Instance Variables -> Set Value", right? Is that the action I'm supposed to use? I still don't know how to set the direction to anything, as I just don't know which action I should use.

    To use an instance variable inside an expression, you have to write it in the format : Object.Instance_Variable (e.g. Sprite.Down, Enemy.HP, etc..)

    To set it, you just have to select it from the dropdown list, and to enter the value you want

  • {"c2array":true, 
    "size" :[2,5,1], 
    "data":[
    [["(0,0)"],["(0,1)"],["(0,2)"],["(0,3)"],["(0,4)"]],
    [["(1,0)"],["(1,1)"],["(1,2)"],["(1,3)"],["(1,4)"]]
    ]
    }[/code:9rupk4q1]
    
    should return an array like this:
    
    
    

    "(0,0)" | "(1,0)?

    "(0,1)" | "(1,1)"

    "(0,2)" | "(1,2)"

    "(0,3)" | "(1,3)"

    "(0,4)" | "(1,4)"

    Hope that helps (I do not know about a 3D array though)

  • > It is a samsung Galaxy tab 3, MODEL:GT-P5210, I mostly use the chrome browser, and I didn't saw this problem hapenning on it.

    >

    Have you tried using mouse click events on your tablets native browser to see if mouse input counts as a touch? I'm not sure if its because I'm testing with an older device but it seems that even mouse events work on mobile web browsers.

    It seems to be a native browser problem.

    The native browser does it indeed with only a "on any click", that's annoying :/