Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dreph

Pages: 1 2 3 ... 10
Ask a Question / Debug Drawing not working
« on: February 02, 2019, 01:29:08 pm »
Howdy! I'm trying to debug my collisions, and the enable debug drawing is not showing any collisions at all.  I tested other games I've created before, and they all seem to work fine when I enable debug drawing, but for some reason this one game is not showing the collision boxes to check my issues.

Anyone else had this issue?

Ask a Question / Can I use an animation of an actor as a different group?
« on: January 05, 2019, 11:41:21 am »
So, I know that you can change the collision group to something different for a specific animation, but I'm not receiving the expected results.  Let me explain without the block code.

I had a projectile that had an attack damage variable attached to it via a behavior exclusively to hold attack damage.  If an enemy collided with this object, it was determining the damage required, then would subtract that from its own HP.  Was working fine on its own.

Now, I removed the projectile, but attached the attack damage behavior to my player, and when he does a punch animation the collision group changes into the same collision group as the projectile, and has a value assigned to the behavior for said attack damage.  Nothing is registering from the enemies' side.  I'm just curious as to if it's simply not possible to do that? It seems like it's fairly easy to do in the interface, so I think my logic might be off. 

Let me know if you need to see the blocks.  Thanks!

EDIT: Added the code, it's not a lot.

Ask a Question / Re: How to make enemies detect each other?
« on: November 09, 2018, 01:35:02 pm »
Thanks for that! It's good to know I can get away with it.  I might be able to use simple physics as well because I'm not using gravity for this project.

Also, I was referred to the Easy Math extension a week or so ago, but it's easy math.  I figured that stuff out already. :)

Ask a Question / How to make enemies detect each other?
« on: November 09, 2018, 11:35:26 am »
Ok, so let me start off with my understanding of things.

I have a player follow behavior, it checks player 1 (and 2 if two players are on screen) and adds their X and Y locations to a list.  I used a loop to handle it all, and everything is working splendidly.  X and Y locations for Player 1 and Player 2 are being tracked in a list and all is well.

Now, what I want to do is actually have the enemies stay away from each other... but I have two ideas for an approach to this logic and I would love some input.

My first approach is to create a new list for enemy locations.  The problem is that I plan to have approximately 12-16 enemies on screen at once at some point, and I want to know, before I jump too far into it, if anyone has experience messing around with Always updating a list and issues with performance? 

My second approach is to make each enemy a "sensor" and compare their own X/Y locations to the last collided enemy actor, and adjust accordingly.  Currently the enemies move directly towards the closest player, but I'm sure that I could easily add a quick "if not colliding with enemy group" to their follow behaviors, and have them avoid their buddies by "if collided with enemy group, compare X/Y and move away"

What are your thoughts? I would love to get some feedback before I delve in.  Thanks!

Ask a Question / Re: Dropping/Stacking Items
« on: November 09, 2018, 10:09:55 am »
For me, that happens when a high-cpu intensive event happens under "When Updating", but without logs I cannot be certain.  I wish I had more to add.

Ask a Question / Re: Dropping/Stacking Items
« on: November 08, 2018, 01:22:09 pm »
So, when it crashes, what is the error you receive?

The easiest approach for this is to store these scores as two attributes.  You can have a currentScore attribute and a lastScore attribute.

Have the lastScore be a game attribute, and the currentScore attribute as the score value that is tracked.  At the end of each level, set lastScore to currentScore, then if they die or have to restart, make sure the scene sets currentScore to lastScore attribute.

That should do it. :)

Ask a Question / Re: GoTo Line Equivalent for Stencyl
« on: November 08, 2018, 01:07:02 pm »
A quick Google search answered the question for me.  "Spaghetti code is bad practice, and Haxe does not have this functionality.  Use conditional loops instead as they are much more clear"

Back to the drawing boooooard!

Ask a Question / SOLVED - GoTo Line Equivalent for Stencyl
« on: November 08, 2018, 12:57:00 pm »
Is there a way to label a statement, like most other languages, and have a GoTo <label>?  Even command prompt has a GOTO function, I just don't think I've seen an equivalent in Stencyl blocks.

Actually, just like I mentioned I don't think it should have been working to begin with.  I believe it was the order that the scripts were running, but the fix was to add a delay to changing "Spawning" to false after EnemyCount > 0

Hope this example helps anyone running into issues like this.

Howdy! So I'm having a strange issue, and it's likely that it should not have been working to begin with, but here it goes.

I am working on a Spawn Enemies script.  The concept is that once the player(s) get to a certain point on the screen, the enemies spawn AND then it sets the next checkpoint for enemy spawns. As of yesterday, this was working perfectly.  It would increment the CP attribute by one, and get the appropriate coordinates for the next checkpoint.  I was playing around with making it a bit more complicated, but then it started incrementing all the way to the last checkpoint immediately after the enemies spawn at the first checkpoint.  What did I do wrong?  Any input is welcome.

I'll check back in if I figure it out before anyone is able to give input.  Sorry for delays in replies I'm also taking care of a newborn.

Ask a Question / Re: Set Offscreen Bounds clarification
« on: November 06, 2018, 04:35:22 pm »
I read somewhere that this affects ALL actors, is this true?  Or is it only for the actor that is attached to?

I figured it out.  It seems to affect all actors, but the Top, left, bot, right do not require extra math.  It seems like the blocks acts more like additional padding outside of that side of the screen.  Thanks for the input.

Ask a Question / Set Offscreen Bounds clarification
« on: November 06, 2018, 04:06:52 pm »
So, when I set offscreen bounds, does that mean in relation to the camera or in relation to the scene?  Just curious.

Ask a Question / Re: Jumping While in Air/Falling
« on: November 06, 2018, 04:05:00 pm »
Sorry for the delay, but it is because you are setting the y-speed of the actor instead of pushing the actor or setting velocity.  Therefore, when the actor jumps, they never stop jumping because nothing in your code stops the actor from "Set y-speed"

If you use push actor or set velocity, that alleviates this and utilizes gravity.

Ask a Question / Re: Jumping While in Air/Falling
« on: November 02, 2018, 12:32:48 pm »
Ok, so I had to look at the code a few times, but I think I know where you need to start.

First off, you have a Touch Floor attribute.  You need to make sure that this attribute is being triggered back and forth appropriately.  With that said, you need to make sure that the platforms are in the appropriate groups and not just "Actor" which is default.  Check your Actors for the platforms and make sure they are in the Falling/Unmoveable Platform groups respectively.

Secondly, you have two places that involve "action1".  One of them is an input trigger, and one of them is under "when updating" for input.   You only need one of those in action to initiate the action. 

Finally, during your "when updating" portion, you have a spot that automatically sets the y-speed in a downward direction if "Touch Floor" is false.  Depending on how your logic is going to be finalized, you may want to rework how falling works and utilize gravity and pushing the director.  Hope this helps.

Pages: 1 2 3 ... 10