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

Pages: 1
1
Ask a Question / Re: How to get internal actor variables/attributes?
« on: December 29, 2012, 02:36:21 am »
Oh my, I just figured it out. I just didn't realize I could drag the actor of type block onto the dropdown list of 'Self'.  ::)
Ok, I should be good from here on out, so thank you for you patience. I might attach a quick example of how it can be done to this thread later, because it's pretty simple, but also pretty different than anything else I've ever seen.

2
Ask a Question / Re: How to get internal actor variables/attributes?
« on: December 29, 2012, 12:36:52 am »
Thanks again for pointing these out, I couldn't seem to find those posts. However, they all are pretty much saying the same thing, and I just don't understand it.

Quote
You can loop through an actor type or actor group that ActorB belongs to using the "for each actor of type" or "for each actor of group" block. You can then either set an Actor attribute to "actor of type" or "member of group" (drop the supplied block on your attribute), or use that same block to perform you action directly (drop the supplied block on an attribute getter/setter).

The last sentence just doesn't seem to make any sense to me. I've tried reducing the problem to it's essence, which looks like this:

Quote
Draw the X or Y coordinate of Actor B (that is in the scene, but only once) from within the draw event of Actor A (that is also only once in the scene).

If anyone could provide me an example of how this could be achieved I'd be really grateful. Slowly I'm starting to wonder if I'm just too stupid for Stencyl logic...

3
Ask a Question / Re: How to get internal actor variables/attributes?
« on: December 28, 2012, 10:49:43 am »
Hi again,

I tried your suggestion using the 'actor of type', but I still can't seem to get anywhere.
You said the problem is quite common, but I couldn't find any tutorials or forum entries on this topic. Could you maybe point me in the right direction?
Thanks!

4
Ask a Question / Re: How to get internal actor variables/attributes?
« on: December 28, 2012, 08:16:08 am »
Hey captaincomic,

thanks for the quick reply. However, I still can't figure out how to get <y of ActorB>. I can find the block, but the only choices are 'Self', 'Last Created Actor', 'Last Collided Actor' and 'Choose Attribute'.
I tried using creating an Attribute 'Actor Type' with the specific Actor I want to get the property from, but that gave me the error:

Call to a possibly undefined method getY through a reference with static type stencyl.api.engine.actor:ActorType.
                  _yPos = _menuItemPlay.getY();

I'm pretty sure I'm just missing something pretty simple.. again.

Thanks for helping me out!

5
Hey Rob,
thanks for the quick answer!

I just now figured out what I was doing wrong: I tried to copy the whole event instead of just the code block inside that event! I'm feeling a bit thick right now...  ::)

So just for the people that might be stuck on the same thing:

To use a code block in another actor event or behaviour, create the appropriate event (like 'when drawing' or 'when updating') and then copy/paste the code blocks within that event.

Thanks again!


6
Hey again,

another question came up when learning Stencyl the past few days:
is there no way to copy and paste code blocks to another behaviour? At all?

For example I made a scene behaviour for a menu structure that worked pretty well but I realised I'd rather attach it to an Actor than a Scene. Now there seems to be no other way to do this other than rebuilding all the blocks in a new behaviour. Which seems a lot more work than it needs to be, especially when you want to re-use certain parts of a code in another behaviour.

Am I missing something completely obvious or is there no such feature?

7
Ask a Question / How to get internal actor variables/attributes?
« on: December 28, 2012, 02:38:22 am »
Hey there!

Just wanted to ask if there is an easier way to read internally stored variables from another actor.
I know you can get an attribute from a behaviour, but what I want to do should be much simpler:

I'd like to set the Y position of Actor A to the Y position of Actor B. I know from Game Maker this is really easy. In the update event of Actor A write

y = actorB.y

In Stencyl I can't seem to find a simple solution like that (or any other proper solution for that matter). I must be overlooking something, because getting values form other objects is needed all the time.

Can anyone help me out?

8
Chit-Chat / Re: Introduce Yourself!
« on: December 28, 2012, 02:23:31 am »
Hello everyone,
my name is Clemens, online I go by Rostiger. I am a co-founder of Broken Rules, an indie company from Vienna. We made a game called And Yet It Moves for Win, OSX, Linux and WiiWare. Our second game, Chasing Aurora was released on the Wii U with the launch of the console a few weeks ago.

I'm the lead artist on the team and usually my hands are full with creating content for our games, but when I have a bit spare time I like to work on my personal stuff and prototype ideas.

I stumbled over Stencyl when I was searching for an alternative to GameMaker, a tool that I have been using for quite a while. Although I enjoy how straightforward writing game logic with GM is, they really made a mess with their DRM and their non-unified approach on operating systems, which turned me away from them.

Stencyl looks like a potential replacement for GM and I'm looking forward to dive in further!
Cheers!

Pages: 1