Ability to select "Actor Type" in the dropdown box of blocks

LePoulpe

  • Posts: 181
Hi

When using a scene where actors are created directly by Events or Behaviors and not arranged since the Scene Tab, it is not possible to select within the blocks with the dropdown box.

It is proposed only in the dropdown box:
  • for Scenes : Choose Actor
  • for Actors : Choose Attribute

It's really frustrating because all of these blocks can not be used if actors are not created since the Scene Tab.

I don't know why it is not already implanted in Stencyl maybe it's not possible.

But it would be really great if you could choose:
  • for scenes: Choose Actor Type
  • for Actors: Choose Attribute with an Actor Type Attribute

I have attached screenshots of blocks with examples to illustrate my point (first : for Scene and second : for Actor).

Thanks

Hectate

  • *
  • Posts: 4645
Perhaps you're misunderstanding what the purpose of an "Actor Type" is when compared to an Actor alone.

An Actor Type is a template of sorts. When you "Create Actor of Type X" you are telling it to "Create a new Actor, of Type X". You cannot modify an Actor Type during the game, it's purely for you during game creating in Stencyl.

You can't just "Choose Actor" since that actor doesn't exist until you play the game and it gets created!

If you need to select a specific Actor that you created using an event or behavior, there are other ways - and that's the purpose of the Actor attribute.

For example, let's say I create an actor of type "Bullet" when I press a key. If I ever need to refer to that bullet again in the behavior, I should have an Actor attribute - named "Fired Bullet" perhaps - that I immediately do a "Set Fired Bullet to Last Created Actor" right after creating the actor of that type.

I could also use the Find All Actors of Type loop to locate a specific actor if desired. I could find a specific actor when it enters a region or collides with another actor. There are many ways to locate a specific actor that wasn't created in the Scene Designer. I guess the question is, what are you trying to accomplish that you need help with?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

1MrPaul1

  • *
  • Posts: 1285
In fact, we just need "anything as actor" block, that allows us to create actors by its name. We have this kind of convertor for animations, scenes, texts, numbers, booleans, but do not have so important convertor for actors, and this is really limiting us

LePoulpe

  • Posts: 181
Thanks for your replies.

To be clear I need to select a specific Actor Type that I created using an event or behavior as is the case with the event "Collisions" (When "Actor" has hits "Actor Type").


You have solve my problem with your suggestion to use the Find All Actors of type loop to locate a Specific Actor type.

I did not think we could use in this specific situation, as in the screenshot.

But I think it would still be more convenient to add a "Actor Type" field in these blocks to make an easy to use.






« Last Edit: August 09, 2012, 01:24:05 am by LePoulpe »

Hectate

  • *
  • Posts: 4645
Well, once you do the "for each actor of type" - presumably you've found an actor that you want to remember later? Simply make a new Actor attribute and do "Set ActorAttribute to Actor Of Type"

Later, anytime you want to do something with that actor, use your ActorAttribute.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

how do I create a button that when I hover it selects the button?