R0J0hound's Recent Forum Activity

  • I don't have access to C2 at the moment, but...

    4. I thought there was. At least you can scale the tiles up for sure. I'd assume it can go the other way.

    5. I could be remembering wrong but I thought if you right clicked the animation name then preview was one of the options.

    6. If you closed the image editor and you didn't want that change, you can use undo to revert it.

  • Neither. When you call a function only numbers or text is passed. The function has no knowledge of what variables were used.

    Consider your function call:

    Call "weaponleveling" (ship.bulletexpspeed, ship.bulletlvlspeed)

    If those two variables were 100 and 15 respectfully then this call would be identical:

    Call "weaponleveling" (100,15)

    If you want to modify a variable of a certain instance with a function then you need to pass that instance's uid as one of the parameters and then pick by uid in the function to modify the variables.

    Also as blackhornet stated a function has only one return value. if you set the return variable multiple times then only the last value will be used.

    The main purpose of a return value is when you call a function from an expression. Like this:

    On function "add"

    --- set return value to function.param(0)+function.param(1)

    Global number sum=0

    Start of layout

    --- set sum to function.call(100,15)

  • You can have the bullet behavior bounce off solids, but the physics behavior needs the other objects to have physics to work. The physics behavior will give more realistic bounces though. The third option would be to do your own physics with events, but this isn't by any means simple.

  • This should do it if you give the balls two instance variables dx and dy:

    start of layout:
    --- ball: set dx to self.x-rhomb.x
    --- ball: set dy to self.y-rhomb.y
    
    global number t=0
    
    every tick:
    --- set t to cosp(1, 0.5, time)
    --- ball: set x to rhomb.x+lerp(0,self.dx,t)
    --- ball: set y to rhomb.y+lerp(0,self.dy,t)
    --- ball: set size to (lerp(0,32,t), lerp(0,32,t))[/code:3p4f7h1b]
    
    The cosp() equation is the only one you'd need to tweak.
    With cosp(1, 0.5, time) it will take one second to go from full size (32,32) to half size (16,16), and another second to go back to full size.
    
    1 is full size and 0.5 is half.  You can change those.
    You can make it go twice as fast if you multiply time by 2.  To make it half as fast multiply by 0.5.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Couldn't you just use touch.X instead of converting touch.absoluteX?

    Touch.x gives you the x on the layout.

    You can also use Touch.X("layer") to get an x relative to a layer. If you want a position on a hud layer that doesn't scroll, this would do it.

    If you're intent on finding why

    Touch.AbsoluteX/(WindowWidth/1280) is equal to 640 instead of 1280, take a look at the values of Touch.AbsoluteX and WindowWidth. It could be a high dpi feature of your mobile or something of that effect. There's a project setting for that that you could probably fiddle with.

  • Another way would be to use a Boolean variable "moving" and set it to true every time you change the object's position.

  • Those are effects for Construct Classic.

    Here is a list of effects for C2:

  • It's one of the plugins where the source wasn't provided. There likely are some functions in the runtime that enable that plugin to work though.

  • When compiling the runtime you can change the preview exe as well. It's just another configuration. You can choose from "Release" and "Debug" from these configurations:

    APP

    APP_p

    APP_pd

    DX9

    DX9_p

    DX9_pd

    "APP" and "DX9" are the two runtimes. "p" means preview, and "pd" means debug preview. These match the exes in the "Construct Classic\data" folder. Also you may notice exes with a "s" as well. That means with python scripting, which is done by building with "#define python" uncommented and renaming the built exe to have an "s" in it.

    So in the simple case an exported project will use DX9.exe and when previewing DX9_p.exe is used.

  • An event like this should do it:

    start of layout

    red overlaps circle

    for each circle ordered by circle.y ascending

    --- wait loopindex+1

    --- destroy circle

  • You'll have to be more specific with what you mean by momentum. If you use the bullet behavior on the cannonball it will move on it's own. You could use the physics behavior instead to make it be able to interact with other physics objects.

  • It would be nice if images could be managed independent to objects. All objects would then just indicate which image to use at any time. Right now each object type manages it's own images, so each object needs to do it's own frame loading and whatnot.