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 ... 83
This setup won't affect what you customize in the inspector tab, those values will stay whatever you set them to. You'll just have to add this saving behavior to your actors in the inspector tab, or make them actor events if that's easier for you.

If you want to save attributes for the actors, such as health or something else that changes during gameplay, use the attached behavior (go to File > Import Resource, select the attached image). This behavior uses a dynamic game attribute (you don't need to create those in Settings), and already handles setting the position, so you got that covered as well. Just note that this behavior stores the key "scene name actor ID", without spaces or separators, instead of the options I suggested above.

And that explanation might seem intimidating, but if you look at it piece by piece you'll get the hang of it. That setup basically stores information on actors placed on the scene, and then you do something based on that data when the scene is loaded (set position or kill the actor). Learning this will give you tools to work on more complex stuff later on.

Edit: I'll just add that you might want to clear the checkpoint and the map game attributes if you want to play a scene from a clean slate.

Create a game attribute (or dynamic game attribute) of type map.

For your collectibles:
-When created, check if the map has the key with this actor's ID (use the actor block under Scenes > Actors > Get Actor).
--If it does, kill that actor.
-When the item is collected, add the actor's ID as a key to that map, with any value.

For movable actors:
-Create two local number attributes, Old X and Old Y. Set them to the actor's X and Y positions respectively when created.
-When created, again check if the map has the actor's ID. If it does, get the key's value to set the X and Y positions for this actor, as well as setting old X and old Y.
-In an update event, if this actor's X position is different than Old X, or if Y is different than Old Y, set the actor's ID as a key to the map, and it's X and Y positions as value (you can combine them as text, and split them later. You can separate them with a space or with a comma or a slash).

When you reach a check point:
-Copy (use the "copy of map" block) that game attribute to another map game attribute, call it Check Point Map. When you want to return to the check point, set the main map attribute to a copy of Check Point Map, and reload the scene.

For multiple scenes:
-You can, instead of using the actor's ID as a key, combine as text actor's ID + scene name (use a separator between them, like a comma or a slash). When you check for the actor, split the key, and compare both the actor's ID and the scene. This setup would work for any amount of scenes, with only two game attributes.

Note that this will only work with actors placed on the scene through the scene designer.

Friction will make your actor stick to walls though. What I recommend is to multiply the X speed of the actor to a number between 0 and 1 (excluding 1) when you release the keys to walk and if the X speed is greater than 0. You can control the amount of slowdown that way.

One bug I found: if you press a key in the title screen before the music starts, the music will start playing and won't be stopped. I ended up have both the stage theme and the title theme music playing at the same time.

Ask a Question / Re: Reload issue
« on: April 23, 2019, 09:54:46 am »
Your firing event still decrements the ammo even if it's at 0 or less. You should place the decrement inside that if statement. You might be reaching a negative number of bullets, that's why it appears to not replenish it.

Either that, or you are doing something else with ammunition in another part of your code.

Because that is a scene behavior. In that case, you can pick that "2nd actor" blue block and drop it in the actor option of the kill block.

You can still "kill last collided actor".

^^ A.....   .    . . .. .  I.                      b,,,@T.     ?

Luyren... have you done anything with the pink puff from hal?
Nope... and honestly, I don't know if there is a severe language barrier or something else with vicevicebingo.

I took a look at it yesterday, but couldn't find anything. I did notice however that your player can either collide with the gate, or with the black wall near where it spawns, and the effect happens between the enemy and the block. The way you change the collision response for the block is the one thing I suspect, but even after I removed that code, the enemy was still changing directions at the block.

I'd suggest you create another scene and test bit by bit: just the enemy walking between two walls, then add the block, then the player, and test each time until the bug happens again.

Hi Luyren!

I love that RPG Platformer Kit.

Have you got this kit in Stencyl 3.X version? ... maybe I can update to Stencyl 4... please!
Thanks for the interest! Again, it's still in development. It works with the most recent private build, but I'll release it when it's done, hopefully this year. There isn't any public version at the moment. I'm trying to get more content to start showcasing stuff, and I'll either update the kit's thread, or post on the Stencyl discord server.

I was updating old versions games and kits from Stencyl 2x to Stencyl 4... I got it except RPG Platfomer Kit (Luyren kit). Somebody knows something about RPG Platfomer Kit evolution?
This kit is very useful to other games genres too, AI behaviors are complex but those are awesome!
It's still in development, I'm aiming for a release this year.

Teaching with Stencyl / Re: Error w/ curriculum project files
« on: April 15, 2019, 01:06:19 pm »
[lime.utils.Assets] ERROR: There is no IMAGE asset with an ID of "assets/graphics/3x/tileset-31.png"
Someone more knowledgeable please chime in if I'm mistaken.
It appears you have a resource that doesn't have an associated image, and it looks like it's a tileset. It could be the 3x scale version (Settings > Advanced, you can check the scales you want in your game). I think you can either delete that tileset, or uncheck the 3x scale and clean your project (Tools > Game > Clean Project and Clean Up Unused Files), or just clean the project without changing the the scale options.

Ask a Question / Re: Lists and accessing the value of another actor
« on: April 13, 2019, 11:58:05 am »
Now I know that something about how I am trying to get and set the actor values is not working :(
it is returning Null for the values of hp and max hp
In that case, you either have a typo when you are configuring the HP/MaxHP texts to get those values, or your actors are not setting those values at all.

Also played 2 of your games, they're pretty sweet. I really like the block shooting one

Ask a Question / Re: Lists and accessing the value of another actor
« on: April 13, 2019, 11:08:37 am »
Thanks for responding.
I tried what you mentioned and it still isn't working properly. Code looks nicer though :D

I put a reference picture to what i tried. Is it possible i have to write out the whole name instead of you the attribute blocks for hp and max hp?
Typing out the text and using an attribute shouldn't matter. Your best option is to use the print block in your code to figure out what part is not executing. Also make sure the enemies list is updated from time to time (unless your scene starts with all possible enemies when created).

Ask a Question / Re: Lists and accessing the value of another actor
« on: April 13, 2019, 09:38:26 am »
Use this instead of the while loop:
Code: [Select]
For each [item] in [enemies]
-If [item] is alive and If get actor value hp from [item] < get actor value max hp from [item]
--heal [item]
--exit loop

Ask a Question / Re: How should I make a system of tool upgrades?
« on: April 12, 2019, 04:52:08 pm »
Tools List: list (it must be a list because the order of items is important)
Tool Index: number
Selected Tool: text
Display Positions: list

Scroll the tools using Tool Index, that corresponds to the index in the list. Increment/decrement that number and, if it is greater or equal to the number of items in the list, set it to 0. If it is smaller than 0, set it to number of items in the list -1.
Set the Selected Tool to [get item (Tool Index) from list] whenever you increment/decrement the index.

You can check if the current tool is the desired one by using this block . If the index in the string is 0 or greater, then the text you are looking for exists. You can use this to check for Axe (to know the type of selected tool), and for other words for the level of the tool (like Gold or Iron).  For example, index of "Axe" in "Iron Axe" would return 0 or greater (I think it'd return 5 in this case), confirming the equipped tool is an axe. This assumes you'd have a naming convention like that for all your tools. If your axes are called names like Parashu or Labrys, you'd need another setup.

When replacing a tool with an upgraded one, loop through Tools List, check if the current item has the index of your tool type (Axe, for example), and if so, replace the item in the list with your new tool.

To display all tools, loop through Display Positions(should have the position of all the slots on screen) using "repeat [number of items in Display Positions] times", and draw the item in the Tools List using the current loop count. Add an if statement if the given item is (Flow > Advanced), to avoid drawing null slots. This would display the name of the items in each slot on screen. If you want an icon, just create an actor somewhere in your behavior, and in the loop, switch the animation of the actor to the tool's name (the get item part) and draw that actor's image in the Display Position for that slot. For anything special for the selected tool display, just check if "current loop count" is equal to "Tool Index", and do whatever (use a different font, for example).

On how to configure Display Position, set each item to "X Y" (separated by a space), and when you get the item from that list, split the item into words , and use another get item list. 0 would get the X position, 1 would get the Y position. Just make sure the positions you configure are screen coordinates, and account for that when assembling the blocks (if your camera scrolls, you might need to add the X/Y of camera when drawing).

I think that should cover one way of doing it.

Pages: 1 2 3 ... 83