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

Pages: 1 2
1
Hello peeps, this is my first attempt at making my own game. This is also my first attempt at making pixel art for a game, so please forgive that both are not the highest of quality. The goal of the game is to fight your way through 9 rooms and kill a boss at the end. The game is kind of hard, but I find it fun, and so do the people I asked to test it. Anyway, I hope you guys like TigerLily: Escape The Dungeon.
https://llewellynbunny.itch.io/tigerlily
http://www.stencyl.com/game/play/42257

2
Ask a Question / Re: HTML5 Not playing sounds when scene is loaded.
« on: May 29, 2020, 05:42:54 pm »
Browsers have made changes to restrict autoplaying audio/video so it's probably that.  If I open the link in a new tab I don't hear audio until I switch to that tab.
I think you're right. When I asked some of my friends to test this out they had inconstant experiences.  Some of them never heard any sound unless the sound button was turned off and on again. Some heard the sound after the game started, just not on the title screen. Is there anyway around this? Or at least some way to make it consistent?

3
Ask a Question / HTML5 Not playing sounds when scene is loaded.
« on: May 29, 2020, 03:19:28 pm »
In the title screen for my game, I have background music. This event is how I start playing that music.
But it only plays once you click anywhere on the screen. For example, you start the game and the title screen loads, but unless you interact with the screen, clicking a button or something, it won't play the song. It plays the song from the beginning when you do this. Meaning it does not play the song, and only let you hear it once you click on the screen, It only starts the song once you click on the screen. I tried putting this code in when updating event and every n seconds, but it still does nothing. This is only a problem when I have my game in HTML5, in Flash the music always plays when you start the game.
https://conquistadorbob.github.io/TigerLilly/
 I have put the game in its work in progress state here so you can see for yourself what happens. I spent a long time looking here and seeing other people have similar problems to mine, but no one gave solutions that worked to those problems. The files are OGG files btw. Does anyone have any idea why this is happening>

4
I can't think of anything. All flash games behave that way.
I do suggest you test on HTML5 and see if this happens as well. Most if not all game portals accept HTML5 games, and Flash itself will no longer be suported on browsers by the end of the year, if memory serves. So you are better of worrying about issues on the proper platform.
I have not been using HTML5 because I was lazy and did not want to make OGG sounds and stuff like that. But I have now done so. and I do not have this problem in HTML5.  But for some reason I have a different problem. So like, my title screen has music, and in Flash it automatically plays when the title screen is created. But in HTML5, it only plays once I click anywhere on the title screen. It's like the game will do nothing unless I click on it first in HTML5. I did some looking up on the forums here, and a bunch of people said they had similar issues, but no one replied with a solution.

5
There's a focus event. You can set your actor's speed to 0 or call a custom event to stop it when the game loses focus. I'm not sure if it works on flash/html5, but worth a shot.

This fixes some of the issues, but not all of them. Maybe I am just missing something. I have this in my player moment script because that is where it is most relevant, and it allows me to mess with the player movement more easily. I pause the game which stops all the enemies and all, but the reason I simulate a button release for all the movement buttons is because that stops the player from continuing to move in one direction when they come back. The problem is, now when you come back  it wont let the player go in the direction they were going in until they press that direction's button again. If they were going up with W, it lets them go any other direction except up, until they click W and release W again. My thought was to simulate that action when the player comes back. So in the, When Gains Focus Event, I made it simulate a press and release of each button. But that does nothing at all to change the problem. Like literally makes no difference. I think it might be a problem with my movement event??? Here is my movement.


If you can't find anyway to help me out of this mess I got myself into, that's ok. You've already helped a lot.

6
In My Game you control a guy with WASD, and you use the mouse to click on and shoot things. The problem is if you accidentally click outside the flash window, you can't control the game until you click back in the window. I understand this might not be able to be fixed. However, what also happens is that whatever direction you were walking in before you clicked out, it keeps you going in that direction until you click the button for that direction again. For example, if you accidentally click out of the window while holding W, it makes you keep moving up until you click in the window and hit W again. Is there a way to make it so that if you click out of the window on accident, it just stops the player character? 

7
Ask a Question / PathFinding. [SOLVED]
« on: May 27, 2020, 10:06:39 pm »
This might be something that stencyl is simply not capable of doing, but I would rather ask here and be told, "No you can't do that," than spend hours trying to figure it out just to be disappointed.  I have an enemy that tracks where the player is, and it walks to the player if they are within like 320 pixels.  Right now, they go straight for the player with an random angle of + or -5 degrees. The reason I do that is to help prevent the mobs from clumping together too much, and make the player have to watch their aim a bit more. The problem as you can probably already tell, the mobs get stuck on walls, and I have an idea of how I could fix that, but I am really new to coding and stencyl, so I have no idea if it will work.  My thinking is that if I could somehow detect that a mob is clinging to a wall, I could somehow change its velocity so that instead of going to the players location, it hugs the wall and walks directly on x or y axis. Here is an example.

The black line is what it does now (it tries to go to the player but just hits the wall). The green is what I would like it to do. The first filled in green circle on the enemies path is where it hits the side of the wall, and because the player is below the enemy on the Y axis, the enemy goes down. When it reaches the bottom of the wall it goes in the direction of the player again, but hits the wall. And because the player is to the left of the mob, it goes left. Then it is on the other side of the wall and can just run towards the player again.  I know this only works with convex shapes that have all right angles, but that is all I need it to work for.

I am very aware that this is a lot, and I am not asking anyone to make this code for me. I just want to know if it is possible to do this to do in stencyl, and a general idea of where to start.  Thank you for spending the time to read this over and help me out.

8
The title of this is simplified because I could not word my question in a short manner. I have an enemy sphere actor that finds the cords of the player and itself and sets its velocity so that it moves to the player. But I have a problem. Every time I add one of these sphere enemies to a scene, I need to manually pick the player actor so that it knows what to move to. Is there a way to set the player actor variable without manually picking it out in each scene for each enemy actor?

9
Code: [Select]
Scene Behavior
Number of Enemies: hidden number attribute.
Enemy Group: non-hidden actor group attribute.
Updating
-Set Number of Enemies to 0
----for each actor in group [Enemy Group]
[quote author=Luyren link=topic=60560.msg313855#msg313855 date=1590538272]
[code]
Scene Behavior
Number of Enemies: hidden number attribute.
Enemy Group: non-hidden actor group attribute.
Updating
-Set Number of Enemies to 0
----for each actor in group [Enemy Group]
----increment Number of Enemies by 1
-If Number of Enemies = 0
--All enemies have been defeated, do whatever you want here.
You can also make that an actor behavior, if you want to do something to that actor when all enemies are defeated.
Thanks! I only thought have having a separate behavior for each scene where I manually set a number that goes down when each enemy actor dies. I didn't know how to count the enemy actors automatically. Tysm.

10
You know The Binding of Isaac It's kind of like that. Where when you enter a room, you need to kill everything in that room before the doors open.  I really don't know how to start doing this. There are multiple different enemy actors in each room, but they all have the group enemy. How would I go about making a door open when all actors of enemy are dead?

11
Explanation of what you can use here: https://youtu.be/IsaGtjwo25k
This also has an example of exactly what you are trying to do.
Yo thanks. I didn't really understand how they worked at all, and now that I know, they are very useful.

12
You can trigger an event in the other actor. Simply inside the bullet code add trigger event in the actor of type. I got no p. A hand so I cannot show you. Basically use block trigger event, put the name of the event and to which actor type.

What kind of event do I use in that case? Right now the event in the enemy actor is when this actor hits something else.  What kind of event do I change it to such that it only gets triggered when the event is triggered by the bullet event?

13
Yes, this whole code should be in bullet actor type
Ok so I am trying it out and I am not sure this will work for me. The way enemy actors take damage is inside their actor behavior.  When the bullet hits an enemy it just deletes itself, when the enemy hits a bullet it takes its own health down by 1.  How would I make it so that when the bullet hits an enemy, code inside the bullet actor behavior takes that enemy actors health down by 1?

14
Gotchu Thanks

15
Just to clarify, touched would be an attribute attached to the bullet right? Sorry if this question seems dumb, this is the first time I've ever really "coded" anything significant.

Pages: 1 2