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

Pages: 1 2
1
Ask a Question / Re: Unexpected error when trying to add friction
« on: January 13, 2012, 12:31:04 pm »
So it isn't a problem with my code? =D

Hopefully it's fixed soon...

EDIT: It's working now.

2
Ask a Question / Unexpected error when trying to add friction
« on: January 12, 2012, 08:48:44 pm »
Hi, finally using Stencyl again after a long time... Anyway, I've made a simple platforming engine, just the horizontal(acceleration, friction) and vertical(jumping) movement for now.
It all works correctly, but when adding the friction(I have to make my own because the object takes forever to even slow down)I'll try to move the player it shows me this error:


Code: [Select]
[object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:185]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Common/b2EventDispatcher.as:27]
at Box2DAS.Dynamics::b2World/Step()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:179]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1475]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1395]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1377]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:400]

Here's the code(using a code block in the every step wrapper):
Code: [Select]
//Horizontal movement
if (isKeyDown("left")){
if (actor.getXVelocity() > -maxXSpeed){actor.accelerateX(-xSpeed);};
}

if (isKeyDown("right")){
if (actor.getXVelocity() < maxXSpeed){actor.accelerateX(xSpeed);};
}

//Jumping
if (isKeyDown("jump")){
if (canJump == true){
actor.setYVelocity(-jumpHeight);
canJump = false;
}
}

//Friction
if (actor.getXVelocity() != 0){
if (actor.getXVelocity() > 0){actor.accelerateX(-friction);}else{actor.accelerateX(friction);};
}

Anyone know the problem? I've never done anything with AS3 before(nor any of the previous ones)so I'm not sure this is the best way to do this.

Any help is appreciated. Thanks in advance!

3
Windows / Mac / Flash / HTML5 / Re: Shape Shifter
« on: June 10, 2011, 10:27:44 pm »
Yep.

4
Resolved Questions / Re: Error when using hinge joints with motors
« on: June 09, 2011, 03:10:56 pm »
Quote
Place an actor in scene. (make sure actor can rotate and not affected by gravity)
Right... Should've guessed.
Anyway, thanks!

5
Resolved Questions / Re: Error when using hinge joints with motors
« on: June 09, 2011, 02:21:23 pm »
I've played your game before, but it really doesn't help me much.
How did you set the joint up? Just attach it to an actor and activate the motor?

6
Windows / Mac / Flash / HTML5 / Re: Shape Shifter
« on: June 09, 2011, 11:55:16 am »
Update!
   -Added new levels.
   -Redid some of the graphics.

Soon to come:
   -Lines connecting blocks and platforms.
   -More redone graphics.
   -Moving platforms.
   -More shapes.

7
Resolved Questions / Re: Drawing joints between actors?
« on: June 09, 2011, 11:45:55 am »
Yes! It works! Thanks for your help!

8
Resolved Questions / Re: Error when using hinge joints with motors
« on: June 09, 2011, 11:23:27 am »
Anyone? Am I going about this completely wrong, or is this a bug?

9
Resolved Questions / Re: Drawing joints between actors?
« on: June 09, 2011, 09:48:29 am »
Quote
or there were multiple items in the behavior with potentially null values to begin with.
Hmm... So let's say if I left an actor type attribute empty when adding the behavior to an actor, would that have possibly caused that error?

EDIT: Behavior



Draw = Boolean, true if there is another bridge piece to check for.
Neighbor ID = Number, ID number to check for.
ID = Number, the actors ID Number.
Neighbor = Actor, this actors neighbor actor.
Actor Type = Actor Type, the type of actor to check for.

10
Resolved Questions / Re: Drawing joints between actors?
« on: June 08, 2011, 08:35:11 pm »
Okay, I added the boolean "Draw", before looping through the actors and before drawing I check if it's true. Now for the single swinging platforms I have, it works fine. But when I get to bridges, it just refuses to work, I get the same errors. I've reloaded the game, restarted SW, done everything you suggested, but nothing works.

EDIT: By the way, the Draw boolean is toggled when I set up the behavior for the actor, true if there's another bridge piece, false if there is not.

11
Game Ideas / Re: What is Your Working Process?
« on: June 08, 2011, 06:55:42 pm »
An idea will usually pop into my head, then I'll make the base engine and stuff for it adding more ideas as I go along.

12
Hello! I'm trying to make a circular motion moving platform using stick and hinge joints. I use 3 actors, the base(circle), and 2 platform actors. I give the base a hinge joint, and connect the base and the 2 platforms using a stick joint. This works fine and all, no errors. But, when I activate the motor for the base's hinge joint, it gives me this error:
Code: [Select]
object AlchemyExit]
at Function/<anonymous>()
at Function/<anonymous>()
at Box2DAS.Dynamics::b2World/HandleStep()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:185]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at Box2DAS.Common::b2EventDispatcher/dispatchEvent()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Common/b2EventDispatcher.as:27]
at Box2DAS.Dynamics::b2World/Step()[/Users/jon/Desktop/stencyl/plaf/flash/Box2DAS/Box2DAS/Dynamics/b2World.as:179]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1379]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1299]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1281]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:354]
Is it a misuse of joints or something? I've also tried removing the stick joints, but it gave me the same error.
Would anyone mind helping me please?

13
Resolved Questions / Re: Drawing joints between actors?
« on: June 08, 2011, 01:34:16 pm »
Okay, Dropbox isn't working, neither is the code tags... Host-a?
http://www.host-a.net/u/Emanrice/Errors.txt

14
Resolved Questions / Re: Drawing joints between actors?
« on: June 08, 2011, 11:16:59 am »
I uploaded a text file of the errors on Dropbox on my last post.
Link: https://dl-web.dropbox.com/get/Errors.txt?w=cdfa0d2a

15
Resolved Questions / Re: Drawing joints between actors?
« on: June 08, 2011, 11:03:47 am »
But I am still getting errors(and massive lag), even after using the internal name of the attribute.
...Isn't there a way to turn of error-messaging in the console? Maybe I can get off the cheap way... Heh.

Pages: 1 2