R0J0hound's Recent Forum Activity

  • The missing conditions are triggers and there can only be one trigger per event. So you'll only see them in events that aren't sub-events of a trigger and don't have a trigger in them already.

  • Try reversing the order of your events.

    Edit... I'm too slow.

  • Quazi's method would work just as fast in C2 except there is no way in C2 to save the result of an effect to use on the next frame.

    Other than that the logic to move the pixels is simple.

    * if the area is free below a pixel is free move it down.

    * if the area is not free try to move down left or down right if those areas are free.

    Here is a demonstration using my canvas plugin. As you can see it is very slow. For this sort of thing you'll want a method a lot faster, but for that you'll have to delve into some javascript.

    https://dl.dropboxusercontent.com/u/5426011/examples17/sand.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I can tell 8DirMovement just sets the angle to the direction of motion. If you want to control the speed of rotation set the "set angle" property to "no" and make an event like this:

    every tick
    --- sprite: rotate 100*dt degrees toward self.8Direction.MovingAngle

    Just change 100 to whatever speed you want. It's in degrees per second.

  • In relation to the original question there a few examples of softbody physics in this topic:

    http://www.scirra.com/forum/bouncy-jelly-effect_topic47940.html

  • Here's a capx since I admit there is some ambiguity with what I typed.

    https://dl.dropboxusercontent.com/u/5426011/examples17/target_specific_instance.capxr124

  • Yann you can also write it like this to eliminate repetitive events:

    + system: every tick
        -> system: set i to 0
    + system: while 
        -> text: append i to text
        -> system: add 1 to i
        + [inverted] system: i < 10
            ->system: stop loop

    shimo you could do it like this:

    + system: every tick
        -> system: set x to 10
        -> system: set random_var to 0
    + system: while 
        -> system: set random_var to int(random(100))
        + system: random_var==4
            -> system: set x to 10/random_var
        + [inverted] system: x == 2.5
            ->system: stop loop
  • The level array you are using is 256x256 but the layout size is 2048x2048. Since 256*16=4096 the layout size should be 4096x4096. Do that and the player won't wrap before reaching the blocks. You can also make the terrain generate higher by changing the values set to terr in event 11, but that completely kills the framerate for me.

  • Arrays in Construct Classic are one based so the correct syntax would be:

    {"me","you","we"}@(random(3)+1)

    because random(3)=0,1,2

    I'm not sure if that fixes your issue but it should help.

  • Couldn't you just use the LayoutName expression with a system compare?

  • You need to use the "pick by uid" condition of "block" instead of the system condition to pick an object instance.

  • You don't need an array for this. Use a Sprite for the blocks as you said and give them an instance variable for the state. You can then make the grid of blocks by placing them in the editor or with events.

    global number grid_top=10
    global number grid_left=100
    
    start of layout
    for "row" from 0 to 9:
    for "col" from 0 to 9:
    --- create block at (loopindex("col")*block.width+ grid_left, loopindex("row")*block.height+ grid_top)

    Then you can do the targeting by saving the uid of a random block to a global variable. Then with events only check for bullets hitting that instance.

    global number target=-1
    
    target = -1
    pick a random block instance
    --- set target to block.uid
    
    every 1.0 seconds
    pick block with uid target
    --- "have the enemy shoot at block"
    
    pick block with uid target
    block is overlapping bullet
    --- destroy bullet
    --- subtract 1 from block state
    
    block state<=0
    --- destroy block
    --- set target to -1