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

Pages: 1 2
1
Resolved Questions / Re: Editing Screen Bounds
« on: September 24, 2016, 09:31:57 am »
Thanks!

2
Resolved Questions / Editing Screen Bounds [SOLVED]
« on: September 23, 2016, 10:20:42 pm »
Is there a way to define the size of the screen bounds? I know within the Scene properties you can change the scene size, but is there a way to define (or redefine) the size of the area that follows the actor if an actor has the Camera Follow behaviour.

3
Ask a Question / Implementing UI
« on: September 11, 2016, 08:15:37 pm »
I have tried to implement various types of GUIs within the Stencyl environment, however I have had no luck. If anyone has a sure-fire way to implement UIs, let me know.

This is the type of GUI I want to implement. (i.e. interact-able floating UI)

4
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:58:41 am »
Wonderful! It works perfectly.

5
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:52:46 am »
Well, I am getting this error now
Code: [Select]
Events for 'Scene2': Null<com.stencyl.models.Resource> should be com.stencyl.models.scene.Tileset
from scripts.SceneEvents_2
line: 99
columns: 11-50
Events for 'Scene2': com.stencyl.models.Resource should be com.stencyl.models.scene.Tileset
from scripts.SceneEvents_2
line: 99
columns: 11-50

6
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:49:36 am »
If I am importing "com.stencly.models.scene.Tileset;" shouldnt the code be "var tile = (Data.get().scene.get(1) : Tileset).tiles[2];" rather than "var tile = (Data.get().resources.get(1) : Tileset).tiles[2];"

7
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:38:01 am »
Code: [Select]
package scripts;

import com.stencyl.graphics.G;
import com.stencyl.graphics.BitmapWrapper;

import com.stencyl.behavior.Script;
import com.stencyl.behavior.Script.*;
import com.stencyl.behavior.ActorScript;
import com.stencyl.behavior.SceneScript;
import com.stencyl.behavior.TimedTask;

import com.stencyl.models.Actor;
import com.stencyl.models.GameModel;
import com.stencyl.models.actor.Animation;
import com.stencyl.models.actor.ActorType;
import com.stencyl.models.actor.Collision;
import com.stencyl.models.actor.Group;
import com.stencyl.models.Scene;
import com.stencyl.models.Sound;
import com.stencyl.models.Region;
import com.stencyl.models.Font;
import com.stencyl.models.Joystick;

import com.stencyl.Engine;
import com.stencyl.Input;
import com.stencyl.Key;
import com.stencyl.utils.Utils;

import openfl.ui.Mouse;
import openfl.display.Graphics;
import openfl.display.BlendMode;
import openfl.display.BitmapData;
import openfl.display.Bitmap;
import openfl.events.Event;
import openfl.events.KeyboardEvent;
import openfl.events.TouchEvent;
import openfl.net.URLLoader;

import box2D.common.math.B2Vec2;
import box2D.dynamics.B2Body;
import box2D.dynamics.B2Fixture;
import box2D.dynamics.joints.B2Joint;
import box2D.collision.shapes.B2Shape;

import motion.Actuate;
import motion.easing.Back;
import motion.easing.Cubic;
import motion.easing.Elastic;
import motion.easing.Expo;
import motion.easing.Linear;
import motion.easing.Quad;
import motion.easing.Quart;
import motion.easing.Quint;
import motion.easing.Sine;

import com.stencyl.graphics.shaders.BasicShader;
import com.stencyl.graphics.shaders.GrayscaleShader;
import com.stencyl.graphics.shaders.SepiaShader;
import com.stencyl.graphics.shaders.InvertShader;
import com.stencyl.graphics.shaders.GrainShader;
import com.stencyl.graphics.shaders.ExternalShader;
import com.stencyl.graphics.shaders.InlineShader;
import com.stencyl.graphics.shaders.BlurShader;
import com.stencyl.graphics.shaders.SharpenShader;
import com.stencyl.graphics.shaders.ScanlineShader;
import com.stencyl.graphics.shaders.CSBShader;
import com.stencyl.graphics.shaders.HueShader;
import com.stencyl.graphics.shaders.TintShader;
import com.stencyl.graphics.shaders.BloomShader;


/* ======================== Custom Import ========================= */
import com.stencyl.models.scene.Tileset;
/* ================================================================ */



class SceneEvents_2 extends SceneScript
{


public function new(dummy:Int, dummy2:Engine)
{
super();

}

override public function init()
{

/* =========================== Keyboard =========================== */
addKeyStateListener("interact", function(pressed:Bool, released:Bool, list:Array<Dynamic>):Void
{
if(wrapper.enabled && pressed)
{
setTileAt(Std.int(2),Std.int(9),0,"" + "2",1,2);

var tile = (Data.get().resources.get(1) : Tileset).tiles[2];
tile.currFrame = 0;
tile.currTime = 0;
tile.updateSource = true;
}
});

/* ======================= After N seconds ======================== */
runLater(1000 * 0.01, function(timeTask:TimedTask):Void
{
if(wrapper.enabled)
{
engine.cameraFollow(getActor(1));
}
}, null);

/* ======================= After N seconds ======================== */
runLater(1000 * 3.7, function(timeTask:TimedTask):Void
{
if(wrapper.enabled)
{
setTileAt(Std.int(2),Std.int(9),0,"" + "2",1,0);
}
}, null);

}

override public function forwardMessage(msg:String)
{

}
}

8
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:29:45 am »
I have the import code in a custom import event and the other code in a custom code block under a Keyboard event

I get this

Events for 'Scene2': Unknown identifier : Data
   from scripts.SceneEvents_2
   line: 98
   columns: 12-16

9
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:21:51 am »
Events for 'Scene2': Unexpected import
   from scripts.SceneEvents_2
   line: 94
   columns: 0-6
Events for 'Scene2': Unexpected import
   from scripts.SceneEvents_2
   line: 94
   columns: 0-6

10
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 11:12:39 am »
Events for 'Scene3': Type not found : Tileset
   from scripts.SceneEvents_3
   line: 101
   columns: 15-54

11
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 10:56:27 am »
That would work for me, yes. There is only ever 1 of the animated Tiles per scene so there would be no problem there.

12
Ask a Question / Re: Problems with Animated Tiles
« on: September 07, 2016, 12:15:45 am »
I have events that change Tiles. for example, when the user presses the F key, a tile at row 1 column 9 gets changed to a different tileID.

13
Ask a Question / Re: Problems with Animated Tiles
« on: September 06, 2016, 11:54:57 pm »
After experimenting further, I believe the problem is not what I initially expected. It seems as though on Scene load, the animated Tiles play in the background. When they are "called" in the Scene, they have already played through.

14
Ask a Question / Re: Problems with Animated Tiles
« on: September 06, 2016, 11:23:55 pm »
Wonderful! Thanks so much :D

15
Ask a Question / Re: Problems with Animated Tiles
« on: September 06, 2016, 09:21:25 pm »
Flash Player

Pages: 1 2