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

Pages: 1
1
So I thought I might be able to figure out this one on my own but really not having any luck.

The attribute is now registering but without a name and adding "type = ANIMATION" doesn't make a difference to the type.

Is there a tutorial somewhere I'm missing or even just one sample behaviour I could crib off? I'd be really happy to write up a tutorial in the style of the crash course guide showing how to build a behaviour once I've gotten a grip on it myself.


2
Fixed Bugs (3.x) / ran into a bug, writing a behaviour in codemode
« on: December 20, 2015, 04:19:10 pm »
It happened when saving the file after adding "type='animation'" to a attribute declaration

3
Awesome! Yes, should've thought of that!
Thank you so much everyone who contributed!
There are still a few bugs with it but I will give fixing those on my own a try before asking for help!

4
Thanks! Sadly though I just tried your suggestion and it's still not showing up as a configurable attribute when I add the behaviour to an actor!

5
I'm sorry I really don't understand that!

So I'm in code-mode for designing a behaviour, is there a way to create an attribute outside of the code itself? I haven't noticed one!

Sorry would you mind expanding?

6
Hi All,

I'm trying to build a behaviour in codemode, but cannot see how to expose attribute's for Stencyl's attention (so they show up as settable when adding the behaviour to an actor). This is my first behaviour I've tried to code so I made it by editing the walk/jump behaviour code from the crash course sample game.

When I attached it to an actor it showed up as not having any settable attributes (i.e. I need to set what the various animations are). I checked the Stencyl help page for code mode and it gave two different ideas on how to expose the attributes to Stencyl, I tried both but neither work.

Here are what i believe to be the relevant lines of code - if you need the whole behaviour then let me know:
What it came as when i clicked "preview code":
   public var _UpAnimation:String;
Attempt one to expose it:
   [Attribute(id="1", name="UpAnimation", desc="Facing Upwards")]
   public var _UpAnimation:String;

Attempt two to expose it:
   @:attribute(id="1", name="UpAnimation", desc="Facing upwards")
   public var _UpAnimation:String;


I also tried adding ,type = "ANIMATION" which didn't help much

Any help would be much appreciated (either a fix or just a working example coded behaviour i code derive the fix from),

Martha

Pages: 1