oosyrag's Forum Posts

  • There are probably several ways to do this, but a straightforward approach I would try run a loop (repeated 27 times), checking if instance variable is between loopindex and loopindex+5, and using pickedcount to confirm if there were 5 picked.

  • You would probably need to build your movement system with custom movement and set vector x and vector y on collision. Sonic style platforming involves quite a bit more than the platform behavior can handle.

  • After your data is entered into the array, displaying (actions) the parts you want based on your filter requirements (conditions) should be fairly straightforward.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is a system condition

    Is between values

    Test if a number is between two values (greater or equal to a lower value and less or equal to a higher value).

    You can use a variable to indicate the start and end values, like x and x+5.

  • Push your data into an array.

    Each row of data would include anything of interest, like timestamp (use unixtime), object, mode, character, location, health, ect.

  • Add 3 conditions, compare instance variable = 2, compare instance variable = 4, compare instance variable = 6. Right click the event and click "Make OR block".

  • Won't know what's wrong with yours if you don't show what you did, but here is an example of conditions by comparing string instance variables. dropbox.com/s/2iwbdrwvt9o8whw/conditionbystring-example.c3p

  • Wait.... you might be right.

    Edit: You're definitely right. Use an instance variable in the family object to identify which object it is (set it on created).

  • Hello there!

    I have some questions about performance.

    1) Am I right that it will result in a better performance if I let the player object check if it is colliding with one of the hundreds of trees in my game instead of letting hundreds of trees check if they collide with the player object?

    There is no difference, the number of collision checks (which you can see and test yourself in debug preview mode) remains the same. As mentioned above, optimize performance by using other conditions to narrow down the number of objects that need checking, by using within distance or is on screen or something similar.

    2) For the tree falling animation I use the spin behavior and check if the tree is 1° to 90°, if so change it to a laying tree object so it will stop spinning. Am I right that it will have a better performance if I swap this tree to another unique tree object before the spinning part so that the eventing will only need to check trees that are actually falling instead of also checking all the hundreds of other trees degrees that are not currently effected from chopping? Or is it more demanding to destroy an object and let another spawn on its position?

    I would use an instance variable to keep track of the state of the tree (0 for stationary, 1 for falling ect.).

    3) I use player to tree collision checking to make the tree 50% opaque if the player is behind. For setting the tree back to 100% opacity I use "on every 0.2 seconds -> tree set opacity 100%". But this affects every tree. Is there a more elegant way to achieve this?

    Use an "Else" event after an is overlapping event to set oacity to 100.

    4) If I set an object to anothers child, it has better performance if I unselect as many of the "child-syncing" options as I can, right? Or do these only really take up performance if their parents are moving or changing their angles?

    Not familiar with this, but the golden rule is that if you can't measure a difference yourself, its not worth worrying about!

    Thank you in advance!

  • You simply put the actions for each object within the family in the actions.

    If there is an action for a specific object, but it is not picked, then the action doesn't do anything.

    So pick top instance of family as a condition.

    Actions

    ObjectA - Do something

    ObjectB - Do something

    ObjectC - Do something

    Only the instance that was picked would be affected.

    Alternatively you can add an instance variable to the family/object as a condition to compare against to take actions.

  • Add a 'scroll to' behavior to your player objects.

    You should try following the beginners tutorials,they cover a lot of the useful behaviours.

  • If the object is synced, you won't be able to use the drag and drop behavior on the peer.

    You will need to send the peer input states like mouse position and button states to the host, and the host will have events to move the object based on these inputs.

    After you get that working, you can duplicate the movement events on the peer side and activate local input prediction to hide the lag.

  • If you're not using tilemap, you'll want to check if an object (wall) is overlapping at that random point instead.