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.

Topics - chongyunxiang

Pages: 1 2 3 4
I am able earn coins in the game which I would like the player to use to buy characters. When the character is locked, if the player clicks on it, it'll create a buy button. But I'm unable to buy it.

What's a good way to create a buy scenario where:
1) Display a "Block" frame of locked character.
2) Display a Buy description & button when player clicks on locked characters.
3) If coins is not enough, disable the buy button.
4) If coins is sufficient, enable buy button.
5) If player clicks on enabled buy button, kill buy and description, display "Unlocked" frame of character in selection screen.

So far, I'm able to accomplish 1 & 2. But I think my code is only applicable to 1 character. If I attach the same behaviour to another character, it won't work. I'll have to create another button with the same code.


Ask a Question / How to trigger same event once per click?
« on: July 22, 2015, 01:06:10 pm »

I created in the Event of the scene that when the player clicks the left/right button, it'll increase or decrease the number of the attribute by 1. Then I made another behaviour where the Number game attribute will determine what actor to create on the scene.

If I place this trigger event on the scene's Always script, it'll keep triggering the same event as pointed out by one of the members. I also managed to make the trigger only happen once. But I can't make it happen again. My buttons are working fine and I'm able to increase/decrease the number attribute. It's just the triggering of the event.

How do I trigger an event once per click left/right to create/kill different actors based on the number attribute, and have it enabled again after the player re-click? Or is there a better way to execute this than what I'm doing?

Suggestion Archives / kerning of fonts.
« on: July 22, 2015, 12:01:22 pm »

I would like to suggest the option of kerning fonts like in Microsoft Word and other graphic/photo editing softwares. So we can use a custom font and adjust the spacing between each letter under the Fonts window.

Sometimes there are custom fonts with lines appearing at the side and I've come to learn that it's due to the canvas size of the font image and not all custom fonts come with an image in the .zip folder.  Of course we could edit the font image separately, but not everyone knows how to, just like me! Haha! I tried editing mine, but I could not do so and Stencyl keeps telling me that the maximum size is 1024 even though my image is already 600.

Not saying that it is a must to have, but it could definitely ease the comfort for people experiencing the same problem as me. And it could also add to the customised outlook for each custom font to suit each preferences.

Thanks for reading!

Ask a Question / Sliding actor to screen, then it starts lagging.
« on: July 22, 2015, 05:12:06 am »

I'm trying to create a  character selection screen, where the player presses the right/left buttons and the panels slide in and out  from the right side of the scene.

I'm able to make the panel appear on the scene, but it's not sliding in. It just "POOF" and it appears! I've also tried adjusting the values, but its still the same.

Another problem is that after my panel appears, my game starts to lag until my Flash Player hangs.

I tried following Stencyl tutorials on YouTube but the same problem appears.


How do I maintain the graphic quality when I export games to different screen sizes?

I'm working on 320x480.


I created my own sprite for my game. Previously I was using Mambo and was able to touch the ground and jump onto platforms. But after I replaced Mambo with my own sprite, my character keeps floating a fixed distance above the ground and platforms.

I resized the sprite to take on Mambo's size, and even check the collision. Where did I go wrong?


Ask a Question / Getting rid of the line beside the numbers
« on: July 21, 2015, 01:35:28 am »
I drew my font on the scene and when I test the game, there's a single line appearing at the side of the numbers. The larger I set the font size to be, the more visible the line will be. Is it because of my font? But that can't be. I tried using different fonts and ended up with the same problem.

The pic I attached is really small, so sorry.

Ask a Question / Making game harder by increasing speed
« on: July 20, 2015, 09:52:15 am »

I made a jumping side-scrolling game that moves the floating platforms towards negative x axis. I want to increase the speed of my platforms after the player hits a certain score.

I created a Behaviour that Sets X-Speed to -20 for Self, and I attached it to my platforms.
I also created a Scene Behaviour that with a custom when Spawn Platform happens, that spawns Platform  and a Do After 1 Second, trigger Spawn Platform.

I tried setting an If statement, that if the Score > 5(just a random number) Set X-Speed to -20 for Self. And for the Scene Behaviour, I created another custom behaviour: When IncreaseSpawnSpeed happens, If Score > 5, Do After 0.5 Second, Trigger IncreaseSpawnSpeed

It kinda works, but the transition isn't smooth, not like those professionally made ones.

I deleted what i tried doing and reverted back to the initial stage.

Where did I go wrong and how do I properly increase the spawning speed to increase difficulty in the game?


Ask a Question / Increasing score when actor hits another actor
« on: July 18, 2015, 11:44:07 am »

I'm able to increase my score when my character hits an actor. I want my score to increase by +1 per actor that my character hits. But it keeps increase so long as it is in contact with the actor and only stops the addition after I part from it.

How do I only add +1 for every time my character hits an actor?


Ask a Question / Jump and hold behaviour
« on: July 17, 2015, 09:42:14 pm »
Is there a behaviour that allows players to hold the button to jump longer/further?


Ask a Question / Disabling controls and time
« on: July 16, 2015, 12:12:37 pm »

I got my controls and countdown timer working. It's just that I can't make my timer stop at 0. It keeps going to -1 and so forth.

And I'm trying to disable all controls after the timer hits 0. So far the only way I could make everything stop is with the Pause function, but that is definitely not the solution to my problem!

I saw a Timer behaviour, it could make my time stop at 0, but it always shows 4 digits, inclusive of milliseconds. It's a really good timer, but I can't get it to just show 1 single digit. Thus I thought it would be better to just make my own timer, which ended up going into negative time!


Ask a Question / How to make fonts stick to middle of board?
« on: July 16, 2015, 03:06:41 am »

I created a counter to count the number of hits and managed to display it by drawing out the counter to be shown on a board.

Problem is that the number doesn't stick to the middle of the board, especially when the number of digits increase from 1 to 2, etc.

How do I make my numbers always appear in the middle of the board?


Ask a Question / Bringing an Actor back to the scene
« on: July 15, 2015, 02:53:38 am »

I want my actor to leave the scene when I depress the Right button, and reappear after I release the Right button.

I can get my actor to "Kill" itself after I depress the Right button, but it doesn't reappear.



Pages: 1 2 3 4