grossd's Recent Forum Activity

  • Looks like i figured it out ...

    the "look ahead" only didn't work, but a negated condition did work -- i.e. when it does overlap and the joystick is still right -- move 5 units to the left to get out of the overlap.

    this worked,

  • Hello,

    I am using a controller to move a sprite (vehicle) around. I want to create in the middle of the screen a rectangle that the sprite can not penetrate when the rectangle is visible.

    Currently, i use tilebackground to create a rectangle, and a button on the control makes toggles it visibility.

    To move the sprite i use the joystick on the control -- e.g. if its pressed right i increase the sprites X location by 5, and similarly in the other directions( right decrease by 5, up -- decreate Y by 5, down increase y by 5).

    This works great to move the sprite around.

    To test whether whether i can move over the rectangle i test for overlap between the sprite the the tilebackground.

    However, here i run into a problem -- once the sprite overlaps with the rectangle its essentially jumped into it (due to the increase of 5) -- and then can not move out of it anymore.

    What i intended was that it can not get into there in the first place -- the incremenets (or decrements) are stopped.

    Is there a better way to move a sprite via a joystick or to test for overlap so that the overlap never happens.

    (I am now thinking that i need to test the X+/-5 Y+/- 5 coordinate before moving that many units -- and thereby ensure that an overlap never happens.)

  • Your code is really great. I am learning a lot, including the use of hierarchy, the ability to pick spatially close or far, the use of timer, etc.

  • Thank you.

    I will look at your example -- this is, btw, what i sort of tried to do, but ran into a bug i couldnt figure out.

  • Thank you.

    Getting to the previous one is somewhat non-trivial, since its a "floating" instance that has to be detected through some pick expression.

    Also, initially, there no other one, so this condition has to be checked as well.

    It looks like I need to keep a (tight) record of a mapping:

    - each vehicle can have zero to n text pop-up associated -- created in some sequence.

    - each pop-up is dynamically destroyed after x seconds

    I, btw, tried to keep a record how many pop ups were created as an instance variable in vehicle -- but ended up with a bug to keep this instance synchronized with the actual number of pop ups ---

    i still don't know what the bug is -- its not obvious --

  • Hello,

    I am implementing a pop up label for a sprite -- e.g. to visually indicate that it received an event.

    A text label is displayed for 3 seconds, 20 pixels below it.

    Trouble right now is how to position another label beside the sprite without obscuring first labels already showing -- i.e. each additional label shown needs to be displaced another 20 pixels below.

    One idea was to detect if there is a collision between labels and if so, move the last one further below. However, text labels don't have collision detection -- can it be added?

  • Yes, Exactly!

    Many thanks for coding it up as well --

    Dan

  • Hello,

    I would like to keep the location of one sprite at an angular rotation relative to another sprite at all time -- based on the angle parameter of the sprite (the direction the first sprite is facing).

    So, for example, consider an vehicle traveling right (angle=0), there would be a vehicle 45 degrees to its right and behind it at constant distance d (say 75).

    Now, if vehicle1 turns clockwise (its angle becomes say 45), i want the following vehicle on the right, to fall back, to keep to 45 angle and distance d.

    This means that the Angle parameter of Vehicle 1 must be translated to an angular rotation of the X,Y coordinates of the following Vehicle 2.

    Is there a set of forumals that work in degrees (expected by cos and sin in C3) that could be used?

    thanks,

    Dan

  • Hello,

    I recall that one key added value of C3 that it enables extending C3 itself via plugins -- quite like Visual Studio allows creating VS extensions via plugin and an internal IDE object model.

    Is there documentation how this could be accomplished in C3?

    thank you,

    Dan

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Great. Thank you!

    Dan

  • Hello,

    I am wondering what would be a good way to create a line (link) between two sprites.

    Think for example about a flow chart with two boxes -- each box a sprite, and a line with an arrow between them.

    Suppose the line can be drawn by a sprite moving from one box to the other.

    The line would need to be of length between the two boxes.

    And the line needs to move if one or both boxes are moved (dragged and dropped).

    Sprites are always of fixed size -- is there an good approach to accomplish this?

    Perhaps, via resizing a line, or perhaps with many canvas instances, one for each drawn line, and these need to be managed somehow for resizing and rotation ...

    any thoughts are much appreciated,

    Dan

  • ok. got it

    the xbox gamepads are the preferred ones, per documentation

grossd's avatar

grossd

Member since 4 Feb, 2014

Twitter
grossd has 1 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies