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 - Luyren

Pages: 1 2 3 ... 152
1
Ask a Question / Re: Attempting Crash Course 2
« on: Yesterday at 07:23:11 am »
You decided to make "ShipHealth" a game attribute (purple). Under Settings > Attributes, your ShipHealth is set to 0. Unless you give it an initial value greater than 0, your ship gets Fist of the North Star'd and is already dead before you even compile. You are setting a blue attribute "Ship Health" to 5 in a when created event for the Player Ship. Purple and Blue attributes are different.  Furthermore your "Hit" custom event is decrementing a local attribute (blue). You are mixing two different things.

Solution: remove "Ship Attribute" from Settings > Attribute, then in your "Update" event, replace the purple block with the blue one.

Other notes:
-Use only one "Updating" event in your code per behavior, that's my recommendation. You can have stuff for movement, camera limiting and kill on 0 health all in the same event. Use comment blocks to identify each part.
-There is no code in your bullet to deal damage to the player ship. According to your collision groups, the bullet canot even colide the player ship. That means the enemy ship cannot damage the player at all.
Solution:
1) In your bullet code, replace your collision event with the "something else" collision event (the first one) and adjust your code accordingly. That way your custom event "Hit" will be called for whatever it hits.
2) You'll also need to make your bullet collide with the player ship (Settings > Group).
3) You have to create the bullets further apart from the player ship with an offset. An offset is a position adjustment, something like "X position of self + X offset, Y position of self + Y offset". You must adjust the offsets so that your bullet does not colide with the player ship when created, otherwise it will hit itself. Consult the video I posted earlier about positions. In short, positive X is to the right, negative left; positive Y is down, negative is up.

-You could have made the health portion of your code a behavior, and attach that to both your enemy ship and player ship. That would include health management through non-hidden attributes (ship health as a number that is not hidden instead of setting it on When Created), the "Hit" custom event and death on 0 health. Making behaviors for reusable code is my recommendation.

2
Ask a Question / Re: Attempting Crash Course 2
« on: February 21, 2024, 04:50:02 pm »
Open your bullet actor, click "Collisions", and check the "Is a Sensor?" box on the right side.
The increment/decrement block only applies to local attributes (the blue ones you create inside the behavior), game attributes don't show up in them.
Click "File > Export Game...", and attach the generated .stencyl file here, that way I can take a better look.
From what I saw, you only have one bullet actor, and it only has an event to hit the player at the bottom. Furthermore, the way you are creating the player bullets, they spawn on top of the player and deal damage.
As for your last question, a sudoku game is possible, but I think that's a bit more "asbtract" than a space invaders clone or platformer for instance, with its own set of challenges. That would apply regardless of your game engine of choice as far as I know.

3
Ask a Question / Re: Attempting Crash Course 2
« on: February 17, 2024, 05:03:27 pm »
Likely your bullet actor is not set as a sensor in its collision tab. Your alien ship physically collides with your solid bullet and that interferes with its motion.

4
Ask a Question / Re: Attempting Crash Course 2
« on: February 17, 2024, 12:25:50 pm »
I don't know what "desynchronize" and "goomba behavior" is. If you provide screenshots or any visual aid and explain what you mean, someone might be able to help.

5
Ask a Question / Re: Attempting Crash Course 2
« on: February 16, 2024, 05:08:51 am »
Push sharply instead of gently.
And regarding your first screenshot, watch again the second video I linked.

6
Ask a Question / Re: Attempting Crash Course 2
« on: February 08, 2024, 04:19:27 am »
A few tutorials that cover your issues: https://youtu.be/j10SMwy2prM and https://youtu.be/LxN6yGSOkD4
The short version: x-dir and y-dir accept values between -1 and 1.
The update event happens 100 times per second.
A do every will keep repeating unless you have the exit condition inside of it. External if checks won't be able to interrupt it. Another tutorial on the subject: https://www.youtube.com/watch?v=8A3mmm32l6g

7
Ask a Question / Re: Toggle Block animations not working
« on: October 28, 2023, 05:32:46 pm »
This video explains how to use the basic events, of which "Update" is the most important:  https://youtu.be/j10SMwy2prM
It should explain how timing works for that events, which is your issue at the moment.

8
Ask a Question / Re: Sand Box Violation
« on: October 27, 2023, 05:25:24 am »
That's a flash-only warning and is harmless, you can ignore it. If you don't want to see it, test in another target, HTML5 for example.

9
Paid Work / Re: Help With Some Programming Events (I'm a noob)
« on: October 05, 2023, 06:57:21 pm »
Assuming you attached my Player Control behavior to your actor, you probably set your jumping right animation to the jump left animation attribute.

10
Paid Work / Re: Help With Some Programming Events (I'm a noob)
« on: October 05, 2023, 11:37:48 am »
Your problems are not related with the behaviors. For general tutorials, you have the crash course: https://www.stencyl.com/help/start/
and Stencylpedia: https://www.stencyl.com/help/toc/

For some of my videos explaining some key concepts: https://www.youtube.com/violinistpenguin
You are having issues with friction, which you want to set to 0. A video specifically on the subject: https://www.youtube.com/watch?v=97M4hchcfwI

I recommend carefully reading the description of each attribute in the behavior, and most importantly go through both Crash Courses at least once to get familiar with Stencyl.

And finally, discord is more active than the forums:  https://discord.gg/XjawJCW

11
Paid Work / Re: Help With Some Programming Events (I'm a noob)
« on: October 05, 2023, 09:52:43 am »
I'm not here to take your offer, but to show you existing resources that can get you started:

If you click to add a behavior to your actor and select "From my Library", there are some pre-made behaviors you can use as reference.

Here you can also get more references, including a jump and run kit: https://www.stencyl.com/developers/samples/

Finally, my Player Control behavior is pretty comprehensive on the subject of platform movement, and you can get it here for free. Use it directly or just as reference: https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors

12
News / Re: Stencyl 4.0.4 - November 14, 2020
« on: September 27, 2023, 08:06:04 pm »
You can hit ok on that message and use the resource pack normally. Back up your project before importing any third-party resources. The latest version of Stencyl are for subscribers only, until the next public build is released.

13
Ask a Question / Re: Attempting Crash Course 2
« on: September 07, 2023, 04:46:27 am »
Print block prints to the log viewer (big button at the top) whatever you place into it, used to determine values and check if code has properly executed or not for the most part.

14
Ask a Question / Re: Attempting Crash Course 2
« on: September 06, 2023, 07:33:10 pm »
1) Do every is not do after. Looks like you mistook the two in your first screenshot.
2) Your "code6" screenshot doesn't quite make sense. You are setting a game attribute called a number to 0, and later on you increment that number.
3) Use print blocks to check the values of "Victory Counter" and "WIn?". Unless you have another scene behavior switching to actor space, that boolean of yours is the only thing preventing your code from executing. You can also simply remove the if statement and draw your text directly to confirm it.

Either that or your font of choice is camouflaged in the background.

15
The error window should have a button to generate the logs, which creates a file containing them. Post them here so we can take a look. Or you can just try testing the game again, could be a one time error.

Pages: 1 2 3 ... 152