RockmanZero's Recent Forum Activity

  • Hi all

    Can someone have a quick look at this and tell me what I'm doing wrong please, I am trying to compare the cells in the array after I have finished creating the sprites for the array, but all I get is a black screen.

    dl.dropboxusercontent.com/u/57137706/arraytest.capx

    Many thanks

  • Hi everyone, I was using arrays correctly after all but because of how the debug display is shown I thought I was using it wrongly.

    I managed to get it working to this stage but the method I'm using to detect the walls is flawed it seems. As soon as I added in another wall it messed the whole thing up.

    As you can see the corners should be 7,8,9 and 10. While the north wall should be 3, east wall is 4, south is 5 and west is 6.

    dl.dropboxusercontent.com/u/57137706/image3782.png

    I am trying to detect which sprite is a wall and assign a variable to it for easy access.

    Since the event list is too long now here is a capx.

    dl.dropboxusercontent.com/u/57137706/arraytest.capx

    Thanks you for your time and help

    Kind Regards.

  • Hi Yarasmodai,

    I got round this problem by having a family with all the buttons which makes the menu open, then have another family with all the buttons to close the menu. On the close menu family I set the position of the menu to be outside of the layout like -50x and -50y(so it cant be seen) and on the open menu family it sets the menu to the position where you want.

    There may be a better way to do it, but this should work.

    Hope this helps.

  • Ashely

    But Ashley it's not disabling them all, its only disabling the new created instances any existing instances still works correctly. If you look at the instance above sprite5 then you can see it still functions with collision after its been disabled. But since it can't be fixed is there any workaround for a custom jumpthru per instance.

  • Hi Ashley,

    Basically I'm trying to make something similar to a jumpthru without using the platformer behavior, when the collide variable is false collision should be on between sprite and sprite5. New instances automatically have the collide variable as false. Which should mean that the collision between sprite and sprite5 is on.

    Here 2 capx hopefully this explains it better. I've left the text objects so you can see the variables between the objects.

    The only difference between the 2 capx is that I moved the sprite object above sprite 4 to another position in collide2.capx.

    dl.dropbox.com/u/57137706/collide1.capx

    dl.dropbox.com/u/57137706/collide2.capx

    In collide1. The new instances should not be going through sprite5 since the variable is set to false.

    Basically when the variable on one instance is set to true it is disabling the collision for all new instances. All existing instances work correctly though.

    Ashely

    Here this might explain it best.

    dl.dropbox.com/u/57137706/collide3.capx

    press z - (collision works correctly)

    now click on one of the instances of sprite on the bottom so it jumps up. (Still working correctly)

    now press x - new instance goes through sprite5 when it shouldn't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Ashley,

    New instances are behaving strangely, sprite collides with sprite5 and if you wait till the middle counter reaches the number 12 you can see it also disables the collision of new instances when it shouldn't since the collide variable is false for new instances.

    I also used to be able to just disable behaviors by using the "start of layout event" however as you can see it no longer works. It works for already existing instances but not new ones, as if you disable the "start of layout event" you can see the bullet behavior working.

    I think these 2 problems are related.

    Here is the capx.

    dl.dropbox.com/u/57137706/col3.capx

    Kind Regards

  • Once again thank you ramones, that's a pretty clever way to solve this problem. I've just been using number values, didn't know you could use strings like that.

  • Many thanks Sqiddster, I will give it a shot. I tried to avoid arrays for my first project but I guess there's no helping it.

  • Sorry all, just giving this a bump incase anyone that can help missed it.

  • Sorry keepee, but I don't understand how that would fix the problem could you elaborate please?

  • Hi everyone,

    I'm currently stumped again, I know what the problem is, I just don't know how to fix it. Basically I have a turret which currently has 4 different types of ammo in it and if any of the ammo is greater than zero it would fire based on it being random. My first solution is like this.

    <img src="http://dl.dropbox.com/u/57137706/sol1.png" border="0" />

    But the problem is because it chooses the ammo first, there are times when there is a gap between firings because it is choosing a random number with no ammo in it. So the way to fix this was to choose what ammo was available first, then choose a random number from that seed. For example if ammo1 and ammo2 was greater than 0 then the random seed would be 2, if all 4 ammo types is greater than 0 then the random seed would be 4 but I don't know how to link up the random chosen number with the ammo types. Fixed numbers wouldn't work because the random seed can change.

    Here is the capx

    dl.dropbox.com/u/57137706/variable%20random.capx

    Just disable group 2 and enable group 3 if you want to see the old method.

    Thank you for your time everyone.

    Kind Regards.

  • No probs glad you got it working 80bit.

RockmanZero's avatar

RockmanZero

Member since 13 Jan, 2012

None one is following RockmanZero yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies