DiegoM's Recent Forum Activity

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • That's not a good way of getting around things in general. It's all mostly in your head, the possibility of someone actually stealing your stuff and then go on to make it big because of it are quite slim, almost non existent.

    No one wants ideas, most people want results. Thieves don't want to put in the hard work. Ideas while great on paper, need the hard work to realize them, which is what gives them value.

    If you are still worried, get feedback from people you trust, like friends and family. You might also consider people who are NOT into software development as they would be less likely to take interest in the nuts and bolts of what you are working on, and just look at the flashy colours on the screen.

    On the same note, feedback from people who are only consumers of software, tends to be more honest because they are not aware of the struggle of game development. In short, they are more likely to say something that you might not want to hear, just because they have no idea how hard it is :P

  • I found a couple of things with that project of yours.

    1) The track for the instance was disabled, that means it wouldn't do anything at runtime. You can see if a track is disabled by either clicking on it and checking the properties bar or by looking at it's corresponding check box in the timeline bar. You know all the check boxes to the left most of the bar? They are from left to right Visibility, Locked, Enabled, Show UI Controls.

    You can read more about those in the manual entry https://www.construct.net/en/make-games/manuals/construct-3/interface/bars/timeline-bar

    2) You almost got everything right with the Set Instance action, but you missed setting the track id property.

    You can view the track id property by clicking on the track in the timeline bar and checking the properties bar. That value has to match the one you use in the Set Instance action.

    The manual has more information on the action https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/timeline

  • jobel

    Have you checked the values held in the first X and Y keyframes? You can do so by clicking on the keyframes in the timeline bar and then checking the properties bar. If those values are not 0, when the timeline starts playing, the affected instance will have a slight offset.

    I am guessing you must have changed the initial keyframe with the layout view controls to adjust the starting position of the animation. Normally this works properly for all keyframes, the first one has a little gotcha if the timeline is using relative positioning though.

    Because the values held are relative, by default the first X and Y keyframes have a value of 0, which just means "the initial position at the moment of playing". This allows for the animation to be played starting from the position of the instance, rather than a fixed value. If they change to something different to 0, then the animation will start from the instances position plus that offset.

    Of course, this is all technical mumbo jumbo and you really shouldn't be thinking about it. I have been meaning to fix this for a while because although it is not a bug, it is a very awkward behaviour which really isn't very helpful.

    Hope that helps.

  • Here is a quick example. https://www.dropbox.com/s/7003e5c4ajmdbjg/KeepTrackOfClicks.c3p?dl=0

    Notice the instance variable ClickCount in the Sprite object type.

    Additionally I used containers as a clean way to output the ClickCount variable of each instance to a different Text instance.

  • Use the On click and the Cursor over object conditions together. Then setup your sprite with an instance variable and add to that variable after each click.

    Each instance should be keeping track of the number of times it was clicked on.

  • I assume the name in this case is an instance variable.

    If so, you can use the Pick last created system action.

    From the manual.

    Pick last created
    Pick the most recently created instance of an object type or family. This is useful with the Create object (by name) system action. For example if you know the created object must belong to a family, then you can use Pick last created to pick the created instance from the family.

    https://www.construct.net/en/make-games/manuals/construct-3/system-reference/system-conditions

  • There are a few things to explain here.

    First, if your follower objects already have offsets assigned to them in the editor you can skip steps 3 and 4. Those where in case you wanted to give them a random offset at runtime.

    Keep in mind that for 4 objects you are going to need 4 sets of coordinates that will make up for a total of 8 values. To clarify:

    Follower 1
    Has offsetX instance variable and offsetY instance variable.
    Follower 2
    Has offsetX instance variable and offsetY instance variable.
    Follower 3
    Has offsetX instance variable and offsetY instance variable.
    Follower 4
    Has offsetX instance variable and offsetY instance variable.

    What I mean by relative to the target is that the offsets are values that you add to each coordinate of the target to obtain a result. This table has a few examples using actual numbers to show what I mean.

    Follower Offset (X;Y) Target Position (X;Y) Target Position + Follower Offset (X;Y)
    0 ; 0 100 ; 100 100 + 0 ; 100 + 0
    20 ; 10 200 ; 200 100 + 20 ; 200 + 10
    -10 ; -10 100 ; -100 100 + (-10) ; -100 + (-10)

    "add the offsets of the instance" means exactly that. At one point in your event sheet you must be using the Find path action of the Path behaviour and you are using the coordinates of your player object. Instead of just using the coordinates of the player object, add the offset values as well. Here is another table to try to explain this better.

    Target Position (X;Y) Target Position with offset (X;Y)
    player.X ; player.Y player.X + follower_object.offsetX ; player.Y + follower_object.offsetY

    What should happen is that, let's say your player object has a position of X = 200 and Y = 300 and a follower has offsetX = 10 and offsetY = 20, the values that you end up sending to the Find path action would be 200 + 10 for the X coordinate and 300 + 20 for the Y coordinate.

    Hope that helps.

  • The way I was thinking about implementing it was like this:

    1. Add a couple of instance variables to your follower object, call them offsetX and offsetY, or something to that effect
    2. Spawn follower
    3. Assing offsetX of the spawned follower as a value relative to the target position Ex. -10
    4. Assing offsetY of the spawned follower as a value relative to the target position Ex. -10
    5. When you do find player X & Y, add the offsets of the instance to those coordinates

    Everything will still be working the same, but instead of having the followers go directly to the player, they will go to a position with a slight offset.

    Make sure that each follower has different offsetX and offsetY values, otherwise all of them will go to the same place.

  • Not really.

    What you need to do is make sure the state of your player is updated properly, regardless of what is happening in the keyboard.

    When you need to take control away from the player, disable keyboard input and reset any variables that are keeping track of what it is doing. When you decide to enable the controls again, the player character should be in the idle state.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
DiegoM's avatar

DiegoM

Member since 24 Apr, 2015

Twitter
DiegoM has 1,382,446 followers

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 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

Blogs