timcs's Forum Posts

  • Its not working the bound to layout behavior? Also, checking if the item is overlapping the wall before running its events should be enough.

    This is what I tried first but as mentioned this causing other issues.

    With regards the overlapping check when you say "before running its events" what do you mean by this ? which object and what events

    Thanks

    TimCS

  • A screenshot would be nice.

    Sorry to be secretive LoneVox I am trying to keep this project under wraps at the moment.

    If you are after a screen shot of the level 1 design , then it is simply something like the attachment provided could not see a way to attach it other than a link to an URL this may not say on line for too long however

    Here are the settings for the player :

    And here is the settings for the borders :

    Thanks

    TimCS

  • I have tried the following to get this to work, created a sprite called borders and simply fill this as a colour , then added a solid behaviour to it and for testing set one part of the player as a platform player. Took out the gravity as I do not need this and it seemed to work but now and again, it would allow the player to pass through the "solid" object any reason why this would be ?

    Thanks

    TimCS

  • Hi Triforce

    Thanks for this suggestions, I stupidly forgot to mention that I have random enemies that spawn off screen and then move towards targets that are on screen. If I created these "walls" which I suspect would then have collision as well, would these stop the enemies from entering the gaming screen ?

    Thanks

    TimCS

  • Hi

    My player sprite is made up of three parts (because the collision area is only meant to work with one part of the player is why this is) and so when it is dragged, I have had to unpin and re pin the objects each time.

    I am trying to stop the player object(s) from leaving the "player area" and have tried to add the behaviour bound to layout but this still seems to A) allow the player object(s) leave the bottom section of the game area and b) when the top part of the player object reaches the top part of the game area, the player object starts to be pushed around so that the "head" part of the object drops and the "handle" part of the object because parallel to it. This is really hard to explain but in essence instead of the objects all keeping together and just stopping when they hit the stop, they start to be pushed apart.

    Any thoughts how to overcome this please?

    Thanks

    TimCS

  • You mean this ?

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

    Brilliant , thank you again 99instances20go .

    TimCS

  • 99Instances2Go with all of the help you have given regarding my post I am still working on this game and expanding its progress. With the Allreadypicked boolean set per target, this means only one enemy can only ever hit one target at one time, which to be honest was my originaly idea but then thinking through more , as each level gets harder, I would like the enemies to randomly target the targets even if there is an enemy already there.

    So onto my next question, when the enemies hit the target they always hit the target to what seems to be the origin point. So I have added further imagepoints to the target but the enemies still aim at the center ,the origin point. is there anyway to randomly target any of the origin points on the target object using moveTo or does this require another method ?

    Thanks

    TimCS

  • Hi 99Instances2Go , the general idea of this game is to have emenies aim towards targets and if the enemies are on the targets for a period of time, the targets take damage, the idea is that the player character needs to remove the enemies before the damage occurs. Trying to keep the idea/game details really underwraps to avoid copycats etc (not saying you would do this BTW ) .

    ** EDIT **

    I hope I have not offended anyone with my above comment about copycats as it was not meant to. I have had bad experiences with trusting people I have known for sometime. So sorry if I have offended anyone.

    My next move from this is to create a collectable/bonus object (done some of this already) which when "picked up" will choose a random enemy and remove it. Got some of the logic right, but where I am failing is that I only what one collectable/bonus object to appear at once but at the moment I am getting 3 or more of these.

    Still this is going off subject so if I struggle with that I will post a new thread.

    Hope that gives a better idea of what I am trying to achieve

    Thanks

    TimCS

  • System ... compare 2 values ... sprite.timer.CurrentTime("tag") ... > .. 30

    99Instances2Go

    Thanks again, still stuggling to get the target linked to the enemy by UID to only change that one target at the moment it appears to be changing not all targets but some.

    My logic (although clearly flawed is)

    System->enemy,timer.CurrentTime("overlaptimer") >5 (just to see it happen sooner for testing purposes) <then> ...

    .... for each enemy (I did try the logic first without the for each as well) <then> ......

    Is Food overlapping target .....

    is Food TARGET (variable for UID) = target.UID

    is target.Animationframe = 0 (default frame before any changes are made)

    If all above are true then change target,animationFrame = 1

    To try and cover all basis I even added the if enemy.overlapstarted boolen is true

    I then want to go on to state a similar logic but if the animination frame is already 1 change it to 2.

    Not sure why it is changing only some of the targets to a different frame though

    ** EDIT **

    I think I have sorted it but need to check a few things just in case, what I have done and it makes sense now, is put the for each enemy at the top of the logic and then check the time that has passed

    Thanks

    TimCS

  • Sorry all I thought I had this nailed until now, I got my project to work in that the time for each enemy only starts with the timer once the enemy has reached the target, what I am struggling with now is when the timer reaches e.g. 30 seconds, I then want to trigger an action to change it appearance.

    So I thought I would try System-> every X seconds then using Round(enemy.timer.<tried CurrentTime , TotalTime and Duration here>("timetag")*100)/100=30

    But this has not worked. I presume I am going about this all wrong but there does not seem to be a timer compare to what its value is, there is an On Timer but I cannot see how that would help

    Thanks

    TimCS

  • Try Construct 3

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

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

    That works thanks so when object A starts to be dragged and is pinned to object B. I unpin object A from B and then pin B to A and vice versa depending on which object part is being dragged

  • I'm not the guy to ask about 3rd party plugins.. If something seems even vaguely possible without them, I won't use them. Yeah.. I'm one of those guys ... You'd be surprised how unnecessary most of them really are.

    There probably is though.. but I don't know.

    Best I can figure, whichever one is dragging, shouldn't be pinned. and whichever one isn't dragging, should be. so if you can find a way to switch between the two, it should work.

    spacedoubt

    I think I get what you are saying , so when dragging , reverse the pinned logic and vice versa ?

  • if you're trying to drag the pinned object, it will have trouble dragging, because it is also trying to stay pinned to the other object. if the objects are overlapping, you can just turn the drag/drop off on the pinned object. if they are not overlapping, you could maybe have the drag/drop and pin switch enabled/disabled depending on which sprite is dragged.. although, there's probably a better way than that, that isn't coming to me right now.

    spacedoubt

    Thanks for you quick response, I will look into this , I would like to be able to drag from either objects , they may be overlapping just though . The only thing is one of the objects coliision polygon is not and intentionally covering its entire body that is why I wanted to pin them this way.

    Is there another form of plugin/behaviour that gets around this ?

    Thanks

    TimCS

  • Hi

    I am sure I have found this before here and have searched here and on the net to no avail. So first of all, I apologise if I have missed something obvious.

    Understanding that the drag and drop behaviour only works with the collision polygon, I had to make my sprite into two different parts and pin these two together. All good so far, however on pinning the objects I can only drag one of the two parts around even though I have applied the drag and drop behaviour to both objects and when I use the other part , I am dragging it from its collision polygon.

    Is there something else that needs to be done to allow both parts to drag ? Eventually this sprite might be made up of three or more parts so I want to make sure that it can be dragged from anywhere

    Thanks

    TimCS

  • Hi

    I have been banging my head on this one because I started originally using when object A overlaps object B count how many times this occurs, then when the counter hits e.g. 10 , add a score value, display an animation and then destroy the object B .

    All was fine as the score increased as expected , however the overlap event did not work how I wanted the game to behave so I changed this to when object A is on collision with object B then add a count how many times this occurred, e.g. 10, then when it reached 10, I added another event no different to the overlap event before hand actioning the same actions e.g. add score, show frame animation which is like an explosion , but now the score is adding up way to quickly after one object B is destroyed

    Any thoughts on why please?

    ** EDIT**

    Ignore this please, figured out what needed to be done on the event that added the score, needed a trigger once while true condition. Sorry to waste anyones time.

    Thanks

    TimCS