BluePhaze's Forum Posts

  • Thanks R0J0hound that cleared it up. Oddly I had that setup but it wasn't working. I have decided there must be some oddity with my events or with my UID's... But I scrapped it and started from scratch and it works fine just like your sample. Odd. Thanks again for all the assistance on this one!

    I am using this logic to create an interactive Under Construction animation for my site. At the load it will do a couple random number generations which will be responsible for picking a set of blocks, a set of enemy types. It will then create the screen and the enemies chosen will destroy the blocks to reveal the company logo and under construction message.

    I figured this would be a nice entertaining method that will also allow me to use some of my game characters/assets to be used outside of the game to make the site more personal for those who end up playing my games.

    Once the site is finished I will find another way to incorporate it just to keep the entertainment value.

  • Doesn't make sense to me currently either. I got it working with "Pick Random Instance" but it skipped blocks for some reason, at the end there would be 4-6 blocks that it just totally ignores. With "Pick Instance with UID" it works, but it does them all in order by UID.

    Using R0J0hound advice I am trying to make it work with "Pick Instance with UID" on the block object. The Block object doesn't have a pick Random instance like the system object does...

  • If you follow the platform tutorial you will also find that using the movement of left and right with platform and using the mirror action for your animation, you can get your player to moonwalk if you hold right and tap left while still holding right. Works the other way as well. I still haven't taken time to get this issue resolved, but I may tackle it soon if nobody else has run into it...

  • 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?

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!