oosyrag's Forum Posts

  • (On Event) - Set Variable to round(random(100))

    (Sub-Events) -

    If Variable < %chance - Do Thing1

    Else if Variable < %chance - Do Thing2

    Else if Variable < %chance - Do Thing3

    ect...

  • Try using a bullet behavior on the sprite, default 0 speed/gravity.

    Condition: Sprite on collide with Player

    Actions: Set Sprite bullet angle of motion to angle(player.x, player.y, sprite.x, sprite.y) //Maybe +180, I forgot if this will angle towards the player or away from the player off the top of my head.

    Set Sprite bullet speed to 200 //Or whatever initial speed

    Decay bullet speed:

    Condition: Sprite bullet compare speed > 0

    Action: Set Sprite Bullet speed to floor(sprite.bullet.speed/2) //Eased out deceleration, you can use sprite.bullet.speed-20 for linear deceleration for example. Best practice might be to add max(0,x) expression to constrain the speed so it does not go below 0.

  • Has copying/viewing the event sheet as plain text been brought up? I think it would be nice to copy pseudocode for discussion via messaging, email, or forums. The current method of taking a screenshot, uploading to a file host, then hot linking seems rather cumbersome to me.

    On the other hand it might disincentivise people from uploading their capx when asking for help, but that happens all the time now anyways. There are a fair amount of legitimate reasons people don't want to share their capx.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you have access to families, put all the spawn items in one family -

    System - For Each PointObject |  PointObject - Spawn ItemFamily
    System - Every X seconds      |
     [/code:2fc0th7q]
    
    If you don't have access to families, create a variable SpawnItem=0 -
    
    [code:2fc0th7q]
    System - For Each PointObject | Set SpawnItem to choose(1,2,3,ect...)
    System - Every X seconds      |
           If SpawnItem = 1          | Create SpawnObject1 at PointObject.X, PointObject.Y
           If SpawnItem = 2          | Create SpawnObject2 at PointObject.X, PointObject.Y
           If SpawnItem = 3          | Create SpawnObject3 at PointObject.X, PointObject.Y
           ect....
    [/code:2fc0th7q]
  • You want the condition "distance travelled > x" and the action "set bullet speed to 0" or "destroy bullet"

    Distance travelled is always kept track of automatically. The action "set distance travelled" is for resetting it to 0, for example.

  • You have given a very general description of your system. There are many ways you can go about it. Have you tried any approach yet? Are you having any problems with anything specific?

    In general, I can only give you the advice that everything is up to you to define Conditions (IF THIS), Actions (THEN DO THIS), and Variables (data storage). For example, you could have an event that says "if your current quest amount is less than 5, then accept quest". Then if the current quest amount is 5 , then this event won't run and the player won't be able to accept the quest.

  • There are many threads regarding this, try running a search. Have you checked in the stickied FAQ thread? how-do-i-frequently-asked-questions_t63692 - Specifically in the section "Monetizing".

    Try also https://www.scirra.com/tutorials/4848/h ... -crosswalk

    EDIT: My apologies, missed the web browser game part >< See below.

  • If all four players have the same amounts/types of information, I would just use a single array. But that depends on how comfortable you are using arrays and their expressions I suppose. It could compact your event sheet significantly, but at the same time make it harder to read or understand.

  • Well actually I'm not really sure how your condition works at all...

    Here is how I would set it up:

  • Thanks, that helps. I can add something to align them after I get them in the general vicinity of where they should be, but had to stop them from running away first! I didn't know Platform picked up momentum from sources outside the behavior.

  • I used the platform behavior to handle gravity for some blocks, except when I move them around some strange things start happening.

    https://www.dropbox.com/s/qfrw5fwjux0gs ... .capx?dl=0

    Please click the blue square to place some blocks, then click the smaller light blue square to rotate the board.

    The placed pieces will start bouncing and flying around.

    I'm already working on another approach without using behaviors, but I'm really curious about what is going on here and what I could try to fix it.

  • Additional discussion here:

  • https://www.dropbox.com/s/r2lgciwcvi6hi ... .capx?dl=0

    Issue 1 - The added condition to the direction will let it run only if it is above, below, left, or right of the center of your boundary box.

    I'm not sure I understand what you are going for your function, but remember, ELSE will only run if the event directly before it on the same level did NOT run.

    It should work as all events do - The function will go through each event until it finds conditions that match, then it will run those actions in that event.

  • It could be useful to know the shape of your sprite(s) and tilemap(s) to think of a way to work this.