tarek2's Forum Posts

  • AnD4D

    Here is another Capx, I removed some Global Variables and changed the way the Loop stops at the End of the Game, I didn't check everything 100% so you may find something that I missed

    https://www.dropbox.com/s/4epggm9jh4ojswy/LimitedFlood_4.capx?dl=0

  • >

    > > tarek2 Took me a while to understand the code. I couldn't see where you were inputting the range, but now see that you are doing it using the line of sight behaviour, which is very clever indeed. I didn't even consider doing that. Great stuff!

    > >

    >

    > Hahha I can imagine hunting for that hiding part lol

    >

    > Thank you, That's a little trick I use when I don't want to use the Overlap is very helpful and limits the Los Range for performance, what I notice in all my experiments with Line of Sight is the more you turn up the Range the more expensive it becomes even if is not in use by the events

    >

    > I'm Glad, you like it, was really fun Puzzle to solve, if you have any questions that you don't understand in my Capx you can always ask me

    >

    I do have one question, actually.

    If I look at the tile in debug during a test; if the selection number = 1, and I click on it, it doesn't change the instance boolean "Checked" to true (1). However, if I pick a higher selection number, such as 5, and then click the exact same tile, it will change the check boolean to true.

    Do you know why that is? Is that important? When I try to change the code so that it will allow such a thing to happen, things start breaking.

    AnD4D you right I didn't count on that Possibility of one single Tile selected at the start of the Game I always counted with one Tile+

    This problem would only happen if the first Tile selected at the start of the Game is only one anything more than one it wouldn't have that problem only happens if is the first tile of the Game selected, if the game was already started and you change to select 1 tile only it wouldn't have that problem as the tiles already active will take care of that

    You can Easly fix this problem by adding one more action on Event 5

    Sprite >>set Checked To True

    That will fix it, I can comment the capx if you like if you have any trouble understanding how it works just let me know

  • tarek2 Took me a while to understand the code. I couldn't see where you were inputting the range, but now see that you are doing it using the line of sight behaviour, which is very clever indeed. I didn't even consider doing that. Great stuff!

    Hahha I can imagine hunting for that hiding part lol

    Thank you, That's a little trick I use when I don't want to use the Overlap is very helpful and limits the Los Range for performance, what I notice in all my experiments with Line of Sight is the more you turn up the Range the more expensive it becomes even if is not in use by the events

    I'm Glad, you like it, was really fun Puzzle to solve, if you have any questions that you don't understand in my Capx you can always ask me

  • AnD4D

    Haa I new Something will be no right, I thought you wanna follow the source where the Flood bigging, I miss understood this statement

    [quote:1eznd0l3]

    having the flooded parts remain in a second click, but spreading. By that, I mean, say you're using a flood of 5. When you click on a tile, 5 other tiles are highlighted.

    I fixed for you

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

  • Yes, you are right, is better like that . I've changed the event to "on pressed".

    I remember that a long time ago I used "On Pressed" for several times and it didn't worked right for me in that situation and after I changed to "On released", than it had. So I guess that's why I avoided using it since then .

    lol I understand now

    Important Note: I forgot to Remove the Boolean "PlugTheBox" from the object (EnergyBoxPickable) as a result you have one more action on Event 90 referencing to that Boolean that is not needed, you can delete the Boolean and automatically the Action from event 90 it will be deleted swell

    Good luck with the Game

  • Ok, got it. So basically add "for each" everywhere.

    Jejeje lol, kind of but the way you say it it sounds really really scary jaja

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a bug in one of my projects; multiple instances are running simultaneous timers and I've been using a tag containing the instance UID to differentiate between them. Sometimes an instance hangs when the timer expires.

    If making the tags unique by including the UID isn't enough to distinguish between timers for instances of the same object finishing on the same tick then that might explain the issue I'm experiencing, hence my interest.

    mekonbekon

    I test it with your idea by using ("fire"&self.UID as a tag) with the example that I posted on the bug report but it didn't work, nice idea by the way and this leads to the next question is the ("fire"&self.UID as a tag) working as it looks? shouldn't give for each Object different tags because the UIDs are all different yet on my test didn't work, so my guess is

    "fire"&self.UID as a tag = exactly the same name no UID numbers added

    or

    "fire"&self.UID as a tag = or something weird because doesn't work jeje as in theory if it added each UIDs of the objects it should work because they have a different unique UIDs and on the manual part it stated if the "Tag" is the exactly the same

    [quote:ih3sh0zv]Manual

    started with the same tag has reached its duration. NOTE: this trigger can fire with multiple instances picked, if their timers all reach their time in the same tick

    Notice the part where it says "Same Tag"

    I think the question now is what is the real "Tag" it gives when you add "fire"&self.UID as a tag, that could tell you if the problem is with the Timers, example the exception is for both (Same Tag or Different Tags)

    or the problem is in something else on the events

  • blackhornet tarek2

    Re. the timer multiple fire issue, is it possible to circumvent this by using "fire"&self.UID as a tag?

    Hi mekonbekon

    As blackhornet said, I don't think it will make any difference if I understood right, the problem is if many Timers trigger at the same Time you can expect sometimes that they will not work as is intended if they have the same "Tag" names, at list this is what I understood I may be wrong though

  • AnD4D

    I Love challenges so I give it a try

    Capx:

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

    This is based on what I understood but maybe I understood it wrong though

  • Thanks a lot tarek2 for taking your time to do this for me . It works fine. I am going to look more carefully to the event sheet so I can better understand what you done there

    Cool, your Welcome sir, Glad you fixed

    Out of curiosity why you have the controllers all of then working by (On released) and not by (On Clicked)

    Example

    -On E Pressed

    -On (Mouse) Left button Pressed

    -Etc........

    Did you realize that if the player is overlapping any "EnergyBoxPickable" and presses the button but the Player keeps moving without release the button it will not Pickup up the box if he is not overlapping anymore when released

    But if you use "button Pressed" it will Pick up or Leave boxes straight away, this is just an observation it's your Game and you can do anything you wish of course

  • Haah that one haha you know how many long nights left me without sleep weeks, I thought it was a bug at the end and I reported here

    https://www.scirra.com/forum/viewtopic.php?f=152&t=198891&p=1154742#p1154742

    I thought the same that the Timers are independents and wouldn't imagine that was an exception for this which make them a bit contradictory and I read the Manual part about "Timers" many Times but as I thought that Timers were independent that's why my brain didn't recognise the "Exception" until Ashley pointed me to that part of the manual, since then it messed up my brain you don't know when or when not to put the for each it looks like if you have more than one object that they gonna use the same Timer at once the best thing is to put the For Each always just to be safe, but hey as it has an easy work around so is not a big deal.

  • Hi tarek2 and thanks !

    Yes , something like this, but it still not working right .

    I mean, If I take the EnergyBox from the EnemyPlug, I can't put it back there again, and I don't know why is vibrating

    I see, to be honest, I didn't have time I was just curious to see what was the problem when I saw all the mess I got Pulled in and just did a quick Fix, didn't check 100% if it was working everything ok but I fixed it for you now,

    Still, you can do it a lot better if you take the time and think the logic and change things lol

    https://www.dropbox.com/s/w0ikremle241b8d/BoxEnergyPick%26Drop2.capx?dl=0

  • Yes. This is what I want but it doesn't work.

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

    anty21ro is it this what are you trying to do?

    Capx: https://www.dropbox.com/s/l7e4j82dbi7j0ay/BoxEnergyPick%26Drop.capx?dl=0

  • moisesremoto3

    I don't think anyone will be able to help you unless the same thing happened to them so they can give you a solution, the best thing to do is share your capx so people will be able to investigate and maybe find the solution other ways they will just keep guessing.

    You can always send me the capx by Pm if you like and I can have a look,

    Remove all the things unnecessary and post it here or send it to me by Pm

  • Thanks a lot, it works now!

    No problem

    Just remember when you have more than one object picked and you need to apply to them actions individually you will need the (for each) always, other ways it will apply the Action just to the first instance of that object = 0