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

Pages: 1 2 3
1
Ask a Question / Re: Top Down Soccer Ball "Kick" Action
« on: February 08, 2018, 03:12:15 pm »
Thanks a lot for your reply.  I don't need there to be a curve put on the ball but I would like to have a mechanic in which a meter indicates how hard you kicked the ball and thus affects the speed of the ball.

Is this for mobile or desktop/flash?

One method would be to calculate it on the length of time the button is held down. Use a number attribute that increments as the button is held down then when it's released use that value to calculate the speed.

It's on desktop/flash. I'll try all this out thank you.

2
Ask a Question / Re: Top Down Soccer Ball "Kick" Action
« on: February 08, 2018, 02:30:10 pm »
There's several things to take into account.

1. You need to know if the ball is close enough to be kicked
2. Is it in a position to be kicked? E.g not behind the player
3. Which way is the ball to travel?
4. What variations are there? Speed? Curve etc.?

There's different ways of doing this:
The simplest way would be to have an invisible actor that sits in front of the player and moves as the player moves. This actor doesn't need a collision shape.
Then check if the ball is within a certain distance of the invisible actor.
If it is, when the player kicks the ball, get the current direction of the player and use that to send the ball in the right direction.

You can check the distance using Pythagorean theorem: If sqrt (( x of obj1 - x of obj2 )^2 + ( y of obj1 - y of obj2 )^2 ) < distance
There's also the Easy Math extension with a block to calculate distance.

As for number 4, that's more complex. Do you need any variations?

Thanks a lot for your reply.  I don't need there to be a curve put on the ball but I would like to have a mechanic in which a meter indicates how hard you kicked the ball and thus affects the speed of the ball.

3
Ask a Question / Top Down Soccer Ball "Kick" Action
« on: February 08, 2018, 01:30:58 pm »
So I'm making a top down soccer game and have made a player character and a ball. I want the player to be able to press a button to be able to kick the ball and apply force to it and not just push it around. How would I go about doing this?

4
Ask a Question / Can't Install Extension
« on: September 20, 2017, 04:19:00 pm »
I'm trying to install the Easy RPG Creator extension. I went to settings then extensions and clicked install extension then went to the zip folder of the extension and clicked on it. But it didn't appear in the list of extensions to enable it after I clicked it. Anybody know what I'm doing wrong?

5
If you want to do it that way, you'll have to code it: http://forums.flixel.org/index.php?topic=3260.5;wap2

I was looking at it but I am kind of a noob when it comes to this stuff.  I've never coded in Stencyl before, I just use the blocks. What exact code would I use and where would I type it in?

6
You say "stop all sounds on channel 2". That will stop the song. You either want to get a current location of the soundtrack and start the other songs at the same spot or you want all of it on one soundtrack and adjust the speed of playback.

I would like to have them all on one soundtrack and just adjust the speed if possible but is there a way to change the speed of the sound on a specific channel using blocks or code?

7
Ask a Question / As the phone tilts more I want the music to get faster.
« on: January 29, 2017, 11:31:16 am »
I am making a mobile game and I want to make it so when the phone tilts more the music gets faster and faster. I tried doing this by having 3 different versions of the same song with different speeds and play them if the phone is tilted enough but it makes the song start all over. Is there any way to do this? I have attached what I tried.

8
Add this event to your actor:
   


Thank you it worked.

9
In my 2d platformer, I want to have a character that will float (fall slowly) when you are holding the up arrow after you double jump Sort of like Peach in Super Mario 3d World. Is there a way I can make the actor fall slower without changing the gravity for the entire stage? I am using the jumping and double jumping behaviors.

10
Ask a Question / Re: Health bar lags when moving along with the camera
« on: January 08, 2017, 01:53:18 pm »
I made the scenes before i made the new character but when I made a new scene and try it out then it worked for some reason. I am not sure why.

11
Ask a Question / Re: Health bar lags when moving along with the camera
« on: January 08, 2017, 05:17:44 am »
If you want to see what I mean choose Sergent Gary Pumpkinface in the character select and go to one of the levels in the flash demo in my previous reply. I have attached screenshots of the events for the health bar and sergeant gay pumpkinface. And for reference, I have also attached a screenshot of the events of one of the other characters that does not have this issue. Keep in mind that both characters have behaviors as well.

12
Ask a Question / Re: Health bar lags when moving along with the camera
« on: January 07, 2017, 07:06:00 pm »
I have attached a playable flash demo and what do you mean by attach the code in question?

13
Ask a Question / Health bar lags when moving along with the camera
« on: January 07, 2017, 06:21:46 pm »
So I am making a game with a few playable characters and when playing as the most recent character that I made there is a noticeable delay when the health bar is following the camera and it appears to lag behind. This is not happening with any other character and the code between characters is mostly the same. I think it might be lag but I am not sure.  By the way, the way I am making the camera follow the camera is by always setting the x and y values to the camera. At first, I tried anchoring it but it was just disappearing so I did that instead. If anybody knows what to do that would be very much appreciated.

14
Ask a Question / Re: Make Player Bounce Off Enemy
« on: December 24, 2016, 08:39:42 am »
ACTORS > TWEENING > SLIDE

Use this block and trigger it when the player collides.

I tried doing that but sometimes it just go up then freeze midair and plays the walking animation.

15
Ask a Question / Make Player Bounce Off Enemy
« on: December 24, 2016, 07:02:55 am »
I am making a platformer and want the player to somewhat bounce off the enemies kind of like in Mario games but I am unsure on how to do this.

Pages: 1 2 3