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

Pages: 1
Ask a Question / How to Copy to Clipboard for Android?
« on: November 25, 2016, 10:53:11 pm »
Hello! I'm trying to do what I thought would be a simple feat: copy a text attribute to the clipboard on android (by swiping down).

I've managed to pull it off with a button press on Flash with the following blocks and code snippets:

Import Statements only in flash
......[import flash.desktop.Clipboard;
......import flash.desktop.ClipboardFormats;]

When (x) is pressed
..set FullScoreInfo to (text)
....[do only in Flash]
........[var textToCopy:String = Engine.engine.getGameAttribute("FullScoreInfo");
........Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, textToCopy, false);]

However, Android is proving to be a bit more difficult. This is what I have so far:

Import Statements only on Android
......[import android.os.Environment;
......import android.content.ClipData;
......import android.content.ClipboardManager;
......import android.os.Bundle;]

When the device is swiped (down)
..set FullScoreInfo to (text) only on Android
........[ClipData myClip;
........String text = Engine.engine.getGameAttribute("FullScoreInfo");
........myClip = ClipData.newPlainText("text", text);

Unfortunately, when I attempt to test the game, I get the following issues:

Send Feedback: Missing ;
   from scripts.Design_48_48_SendFeedback
   line: 107
   columns: 4-12
Send Feedback: Missing ;
   from scripts.Design_48_48_SendFeedback
   line: 108
   columns: 0-6
Send Feedback: Type not found : android.os.Environment
   from scripts.Design_48_48_SendFeedback
   line: 78
   columns: 7-29

Any insight into how this can be done would be greatly appreciated. Thanks!


Got months into my project, which I haven't backed up in quite some time, and now I've run into an issue: I try to open the game and get:

Could not open game. Could not restore from backup.

Seeing what apparently most have seen, where the game.xml and game.xml.bak seem to be empty when opened in notepad. Has anyone had luck with fixing this issue? I've attached a .zip of my project if it helps!


Bug Archives / Update from 3.1 to 3.3 Actors Missing
« on: May 01, 2015, 08:40:28 am »
So I just updated from Stencyl version 3.1 to 3.3. I was prompted to update my game to be compatible with 3.3, and did so. However, this made all of my actors show up as red exclamation points as shown in the first picture below.

I am unable to opening these actors at all. When I try, I get the error "Ouch, this should not have happened! Please generate your logs and post them to the forum."  and the actor constantly stays on "Opening..."

Additionally, when I try to run my game, I get an error for null objects, as seen in the second picture below.

My logs that I generated from the error are the last attachment.

Does anyone have a clue how to solve this? I have a show this weekend featuring my games, and I really need this to be fixed.


Ask a Question / Shooting Water/Water Gun HELP
« on: April 22, 2014, 04:57:45 pm »
So I have an actor that needs to shoot water out of his front while flying. I want the water to shoot out, and as if effected by gravity, bend at the end (think a fountain shooting forward). I've tried 2 things:

Solution1: When button is pressed, create one big actor/animated water stream
Problem: If the water collides with something short of the end of the stream, I want the water to stop there and spawn a collision actor (the white crash of the waves), but it's one big actor. To solve this problem, I just tried the normal solution to projectiles and ended up at Solution2.

Solution2: Create many small actors that are shot out, that combined look like a wave, and when they collide with anything, kill it and spawn a wave crash in its place for a half second
Problem: Obviously, creating too many actors on the screen at once slows down my game substantially, but having too few makes it not look like a stream of water

Any ideas on how I can make what is primarily a water gun work?

Ask a Question / Turning a Hinge Joint Motor off/on
« on: November 01, 2013, 07:45:25 pm »
Say, I have a simple circle in my game, with a hinge joint in it's center, with a motor. Is there a way to turn off and on the motor so the circle only rotates when activated? In this, i'm not concerned with how it is activated, but rather just a way controlling when it's on/off.


Ask a Question / Extending Joints in Runtime, or Creating New Ones
« on: October 25, 2013, 09:00:00 pm »
Here's a prototype of my game that will help understand my question:

The problem I'm running into involves extending the chain that is between the two actors, which was created using stick joints. I'm trying to make a power up, where when the actor collides with it, it lengthens the chain. I've tried making each chain link widen upon collision, AND making the chain's collision group collide with itself, and having the chain switch animations to one with a larger collision shape (thinking this would push the chain from the inside to widen), but nothing I do seems to make lengthen the chain. Any ideas? Tell me if you need more info!

Ask a Question / Make attribute apply to EACH enemy individually??
« on: July 22, 2013, 06:24:13 pm »
So in my game, the player attacks an enemy and it's Chi is released. For my Monk enemy, i have a counter through a number attribute for the amount of Chi the enemy has. When a monk is created, I have it to set the Chi to 1. This can be seen in the image.

PROBLEM: When I kill a Monk, and his Chi is released, killing another monk will not release it's Chi. So I want the Chi counter to apply to EACH MONK INDIVIDUALLY so that each releases just 1 chi when i kill it.

Ask a Question / Switching animation on key press not working??
« on: July 13, 2013, 05:14:09 pm »
So for my game i'm trying to make my character do a bite animation. However, when I press the button, a few things happen:

if my code is: 

1. [key is down], the player just plays the first frame in the animation, and holds it if i hold the key
2. [key was pressed], the player does nothing when the key is pressed, held or released
3. [key is released], the player will play the first frame in the animation VERY quickly (i have it set to 100ms for the first frame, but its more like 10ms) when i tap the key quickly. if i hold the key, or press it slowly, the player will do nothing

Ask a Question / Make character fire projectile in Platformer?
« on: July 10, 2013, 08:39:15 pm »
I'm creating a platformer, and i'm using the Crash course kit (so assume the player is moving the same, etc). I've created the actor of a Wave, and made the animation for it going left, and right. I want the character to push out the wave in the direction he is facing, then I want the wave to disappear. I'm having trouble setting this initial step up. Any ideas?

Okay, so my broad question is: When in the Events editor, how do I know what type of Attribute to create.

For "Facing Right?" people say to create a boolean. But what does it mean, how does stencyl know how to read those words, and check if your character is facing right?? It boggles my mind, and I feel understanding how the program reads will better help me understand how to write.

Ask a Question / Actor won't show run animation--HELP!!
« on: July 08, 2013, 01:34:20 pm »
PROBLEM: Character will not play run animation when I press left and right, it only jitters through the idle animation and glides around.

I created a game from scratch in which I created animations for an actor/ the player. I created both LEFT and RIGHT facing animations for being Idle, Running, and Jumping.

I attached the "Run and Jump Movement" behavior to the Actor (see picture). I created a scene with tiles from a basic set on Stencylforge and set the vertical gravity to 85 Down. From here I began having the problem of the Actor not playing the running animation I set for it when I hold down the right and left keys. The actor simply jitters through the idle animation as it slides left and right. So I downloaded and attached both the "On Ground" and "Animation Manager" behaviors--as this seem to fix similar problems for other in the forums. However, I still have the exact same issue.  My character will only jitter through its idle animation left and right, but will not run.

Pages: 1