99Instances2Go's Forum Posts

  • Zebbi , is this what you try to do ?

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

  • Okay.

    I have an Azerty keyboard. WASD is hellish for me. Changed keys, but that should not be a problem.

    Made the kicking more simple.

    Added an array to manage the re-spawning.

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

    Hope this helps.

  • You are right, best way gonna be an array. I did not expect a 50 seconds, and that the player will be able to kick others in the mean time (not mentioned). I try to make an example, when i got time.

    Thinking about an array that adds on the end. And reads the first index (every second), spawns if needed, and then deletes the first index. A dt corrected time is essential in this.

    One question, dont you need a grid move ?

  • You do not have permission to view this post

  • Basic, no plugins, just lerping.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, if i understand right, the object will respawn at the position where it got kicked.

    And on some time after a kicked object got destroyed.

    Attach the timer behavior to the player.

    Give the object an instance boolean 'kicked'. Set that boolean true when the player kicks the object.

    Give the PLAYER two instance variables for the coordinates. Say 'kickX' and 'kickY'.

    Set 'kickX' and 'kickY' on the moment of the kick.

    Now

    On object destroyed

    Is boolean instance variable set 'kicked'

    .... set the boolean to false

    .... Start a player timer with a certain 'tag' for the time you need

    On timer 'tag'

    .... create object on player.kickX and player.kickY

    Cycle starts over when the player kicks.

  • 'Pick overlapping point' has a 'picking' side, but also a logic part. Can by very handy in a grid. This way (using the logic side).

    Pick (object) overlapping point (imagepoint)

    Else

    At this point you know that there is no 'object' on that place.

    So you could set some variable to represent a 'free' direction' to go.

    Or, just move in that direction.

  • Indeed. Or scale. Or use a helper object. Or pick Pick overlapping point. Or use an animationframe with reduced polygones, but that you cant do when working with physics.

  • I have to admit, it is not that clear, Mirlas.

    I learned by using.

    In general, conditions are part 'picking' and part 'logic'.

    I think all conditions you find under 'sprite' do pick objects and do have a logic part.

    Except the triggers, they have not a realy logic part, that is why you can not combine them with an 'else'. They just fire and pick.

    The conditions under system do pick when they start with 'pick', or when they start with 'for each'.

    Roughly that could help you.

  • (As already said) The condition 'Compare two values' has no 'pick' component. Only a logic component. It is true or untrue, and thats it.

    The star the action is addressed to is therefor unreferenced.

    If you wanna use an object related expression in the Compare two values (Sprite.X, Sprite.AnimationName, etc) then you have to pick that sprite first. Unless there is only 1 instance of that object. Unless you are only interested in the object with the lowest IID when all are picked.

    The condition 'Is pinned' has a 'pick' component and a 'logic' component.

    Its picks all the stars that are pinned.

    Its true when the picklist is not empty, it is untrue when there is none picked.

  • If it is only 1 instance of a sprite, i would place an invisible object on spawn coordinates, make it spawn new ones.

  • Relative.

    'Is overlapping at offset' moves the object temporarily 'offset' amount of pixels and checks the overlap, and then moves it back.

    With an offset x=20,y=-30, it moves the object (from its current position) 20 pixels on the x and -30 pixels on the y, checks for overlap (picks the objects) , and moves it back to current position.

    So, important to understand, it is not checking for collision at that one point in space. It checks the whole collision polygon's of one object against another object.

    If you want the offset to be an imagepoint.... then

    offset on x = sprite.ImagePointX(n) - sprite.X

    offset on y = sprite.ImagePointY(n) - sprite.Y

    I you want to check for an overlap at a certain point in space, you have the system condition Pick overlapping point.

  • Local variable 'check' = 0

    Iterate the array with 'For each element'.

    Compare two values ... find(Array.CurValue,"sword") not = - 1

    If that condition is true then the expressions Array.CurX, Array.CurY and Array.CurZ contain the position in the array.

    And CurValue contains the string

    Optional you can stop the iteration with the action stop loop at this point

    If you want to know all occurrences, then you need an array to hold the positions.

  • The 'invert' inverts the picking.

    The logical 'invert', which is not really an invert - rather an 'if not true then', is ELSE.

  • Dude.

    ObjectA Is overlapping ObjectB

    This picks all ObjectA's that overlap any ObjectB. And all ObjectB that overlap any ObjectA. It is in the first place about picking.

    Secondly, yes, when there is no object ObjectA picked or/and no ObjectB, the condition marks itself as not do-able: or the logical state untrue.

    (handy to follow up with an else)

    True or untrue depends on the resulting picklist, not on a Basic wise IF statement.

    When the condition is true, it runs its actions/subs, and in most cases we use the list of the picked objects to work with.

    Or we refine the picklist with more conditions.

    When the condition is untrue, it will not run its actions.

    You are addressing an unreferenced object in an action. Therefor you only use, what you perceive as, the logical part of the condition. The IF THEN as you like to call it.

    Addressing unreferenced objects is always something that you need to think trough.

    I showed you in a capx how to deal with that. I think that was helpful and on topic.