AllanR's Recent Forum Activity

  • what I like to do when I want to select things like that is use a big sprite called Detector, big enough to cover the area you want to check. set it to tileX and tileY, then have a event "Detector is overlapping sp_tile" to pick all the ones around that tile location.

    either make the Detector sprite invisible or remember to move it off screen after checking is done...

  • a demo project would be best. in your first post you didn't mention you were using Chipmunk physics... little details like that make a big difference. Showing a picture of a few events doesn't help if something farther down is inadvertently undoing them.

    I made a quick demo with chipmunk physics after your second post, tried a bunch of joint types set to the layout, and everything worked fine for me, but I wasn't really clear on what you were doing so I didn't save it...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Christmas

    I would seriously consider using something like Spriter. That way you define all the action sequences with bones, and can then apply character maps for all the different looks you want.

  • well, the single clicks always fire, so just keep track of the dt between two right clicks, and if it is less than a threshold (probably 0.5) then treat it as a double-click

  • 3DDelfin

    like Plinkie said, it wasn't really clear what you are trying to do...

    so I took a guess: (that if you are dragging one object, but the mouse moves over another one, you want to swap and start dragging the second object)

    https://www.rieperts.com/games/forum/mousedrag.capx

    if you have more than one object type then you should put them in a family to keep the code simple.

    you can tell what is under the mouse by using Mouse - "Cursor is over"

    if you are dragging one object, but then want to switch to another one, they will both be under the mouse, so you need a way to avoid endlessly swapping between the two.

    also, if you have many objects on screen, over-lapping, you have to know when it is ok to swap objects, and when to ignore them...

    if you meant something completely different, like clicking on an object to drag, but want to change that to a smaller version thumbnail while dragging it, then you wouldn't need all the ignore code...

  • tinbashingstudios

    are you making a space ship or ship on the ocean? I am not sure what you mean by seeing the whole layout and needing parallax. (for parallax to work you have to have layers extend beyond what is on screen). Do you want the background to loop behind the ship?

    I would make an invisible sprite called Camera - then you can limit its movement any way you want.

    you could check out this thread from a couple months ago:

    https://www.construct.net/en/forum/construct-3/general-discussion-7/scrollto-lerp-front-instead-143258

    I posted a sample that uses a camera object to maximize the space in front of the space ship so you can see what is coming at you. If you download my file, find the Camera object and make it visible so you can see how it changes its position in relation to the ship.

    https://www.rieperts.com/games/forum/spacebackground2.capx

  • I just tested it as well, and you are right - must be a bug. you should file a bug report.

  • YoHoho I made a quick demo - roughly based on other path following samples made by ROJOhound years ago :)

    you can add as many nodes as you want - the only catch is you have to set the NodeNumber instance variable consecutively. if you have nodes 1,2,3,4,5,8 it will stop at node 5 because it wont find a node 6.

    you can arrange the nodes any way you want - it will move from one to the next (either up or down depending on the direction).

    https://www.rieperts.com/games/forum/follownodepath.capx

  • the easiest way to do that was to create a global variable to keep track of which player is the active player...

    then I made space bar just drop the active player's weapon.

    I also added press Enter to switch between player 1 and 2.

    to keep it simple to know which sprite body goes with which player, I also added an instance variable to player that holds the UID of the sprite body.

    https://www.rieperts.com/games/forum/weapon_test3.c3p

    there are plenty of other ways it could have been done... Press 1 to drop player1, press 2 to drop player2

    or press g to drop whoever is holding the gun, etc...

  • put the sprite in a family, and check if sprite is put on spritefamily.

    then you will have both instances picked under different names: sprite.x and spritefamily.x

  • WengWeng

    if you just want the box to stay where it is, you can set its "Immovable" setting to Yes.

    you can also change world gravity, depending on what you are trying to achieve...

    as far as I know, you can only make a joint between two physics objects. So, once you make one object immovable to anchor its position, you can make a joint to other movable objects from there.

  • if you want the weapon to follow the hand, then every tick move it to the image point (without using pin - which will lock it at the one location).

    so, you need to pick players holding a weapon, and then do a for each loop so you can pick the correct weapon, and move it to image point "Hand"

    https://www.rieperts.com/games/forum/weapon_test2.c3p

    EDIT: I didn't remove the Unpin actions from earlier events, but since the weapon is not pinned, that wont cause trouble, but obviously those could be removed...

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies