BluePhaze's Recent Forum Activity

  • vee41

    The pick random block piece is the one causing the issues. Using "System > Pick Random instance" works, but for some reason it ignores some of the blocks. Using System > Pick nth instance for some reason picks them in order and still skips blocks. Using "Block > Pick Instance with UID Random(Block.UID)" also works but again does them all in order even though I am specifying random... But at least it does get all the blocks now and I am not left with 4 or 5 that it just ignores all together.

    The goal is to clear them all, and do them in a random order. So random block is picked, all enemies target it, once it is destroyed a new random block is picked. Here is the current and 14th or so iteration of the logic, I have scrapped generating the grid of block on the fly because it caused random oddness here and there. Currently I Have the state and the animation frame tied together so that as the block is damaged the state changes which updates the animation frame. Note that I have also added an event that sets the state and animation frame of the block as soon as it is picked as the target so that I can tell which one is being targeted before it gets hit. This is just to allow me to make sure that the block being targeted is the same for all enemies at any particular time. I also have a shot variable to control the number of shots an enemy can take so that the blocks do not get cleared out to quickly.

    <img src="http://dl.dropboxusercontent.com/u/10285716/BlockKillerEvents2.png" border="0" />

  • It looks like full screen is larger than the actual resolution... are your window and viewport sizes set the same?

    Also, I love the UI on that! Are you going to do the Shield Power and Ship health to match?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure where the issue is as it seems to work fine for me, here is the events that I have from that same tutorial that work just fine:

    <img src="https://dl.dropboxusercontent.com/u/10285716/EnemyJumpKill.png" border="0" />

    You may want to post the CAPX so we can take a look, there may be a behavior or event issue that we cannot see outside of the events you are showing us.

    For your other question, Vector X/Y moves the sprite in the appropriate direction by that many pixels... Assigning a negative value to Y moves you upward. Assigning values to X moves you either left or right. So you need to capture the direction the player is moving when using the X vector as you need to know which way is "back" when you want to bounce them. My double jump and wall jump tutorials have a bit of tweaking with this as well. You can find them in my signature.

  • Have you tried it at HD resolutions (720, 1080) to see how it scales on devices with larger screens?

  • Thanks R0J0hound that makes sense. How would you assign the random to it? What I have currently now is:

    Block > Pick Instance with UID Random(Block.UID)

    ---- System > Set Target to block.UID

    For some reason though, this still does them all in order. I have tried other parameters to the Pick Instance with UID like Random(0,122), etc... but it does not work. It just sits there and nothing happens. Any better expression to plug into when grabbing the UID to really get a random (but existing) UID from the 100 blocks I Have on the screen?

    Thanks!

  • Whiteclaws Turns out my issue was from using is overlapping instead of using on collision. Much better now!

  • Whiteclaws any chance you have a copy of that capx around still? I get a 404 from DropBox on your link. Looking to resolve some waypoint oddities myself and think your solution may give me some new insight.

  • ADenton I would store the last known waypoint in an instance variable. That way you can put an event that makes the enemy chase the player or attack if they get into a certain distance, then if they no longer see the player, they can use the value in the variable to remember which waypoint they need to head to...

  • R0J0hound Using the method you described, it goes block by block in order when picking the next block to destroy, so I altered it a bit and instead of pick block.UID, it did a pick random instance of the block then assign block.UID to the target variable. This gives the effect of picking a random block each time as the target, but for some reason, whenever they are fired at, it stops after destroying 9 blocks. My assumption is that this is tied somehow to the initial logic creating the blocks as it is the only place I can find the number 9... could be pure coincidence, but after destroying 9 blocks, it stops spawning more enemies to shoot at the blocks... Here is a image of my events.

    I can provide a capx, but everything is here in the sheet since it is all event driven...

    <img src="https://dl.dropboxusercontent.com/u/10285716/BlockKillerEvents.png" border="0" />

  • NVM, I think I got it, system pick nth instance... set it to my target variable...

  • Hello R0J0hound I am struggling a bit picking the block with the UID assigned to the target variable... any clarification on this... in code I would do something like shoot at block where block.UID == target

    I am trying to use the picked block in multiple events, but straining to see how to assign current target as the value assigned to my target value. For shooting at it I need to set the angle of the bullet toward the X, Y of the target, but I first need to identify it via the UID stored in the target variable... I am sure there is just something I am not seeing in my events list that resolves this...

  • Nice, thanks! I will test it out and see how it goes! Thanks again for all the input!

BluePhaze's avatar

BluePhaze

Member since 20 Dec, 2012

Twitter
BluePhaze has 1 followers

Connect with BluePhaze

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies