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

Pages: 1 2 3 4 5
Ask a Question / Do after animation has finished?
« on: July 14, 2011, 03:24:49 pm »
I'm making a death animation and basically want the behavior to run the death animation and then, after the animation has finished one loop, kill the actor.

I'm attaching the behavior to many different actors with different death animations that last different amounts of time and have different amounts of frames.

How can I accomplish this goal?

Ask a Question / Collision help
« on: July 11, 2011, 08:26:10 pm »
For some reason all the "if whatever side was hit" pieces don't seem to want to work. I've attached a behavior I'm trying to use them in but no matter what I do none of the was hit blocks read their insides. I've checked by putting an otherwise block below them that does work and activates every time the actor collides no matter the side but the knocked x and knocked y values never change upon collision.

I added the otherwise block after it wasn't working for debugging purposes so that's not the issue.

Is there a way to do this directly with a game attribute list? One that is global and can be modified by all different behaviors?

If there is, how do you refer to one in the code block?

The issue I'm having (if I wasn't clear) is that I can't seem to tell the code block to use the game attribute list as the list to reference.

Edit: Never mind I think I found it.,1874.0.html

All you need to do is make a trigger for a scene switch. If you need to learn how to do scene switching I recommend using the RPG town example game.

Once you know how to manage scenes and switching between them it's as easy as setting up a trigger. For example make it so spikes and other hazards that will kill you set a boolean (aka a true/false value) like "is dead?" to true.

One way to do this is to give them a behavior (check the "run and gun example game" and look at the inflicts damage behavior) and then when the player collides with anything with that behavior it will set the "is dead" boolean to true. Once the is dead becomes true you just need a check that reads something like
Code: [Select]
If (is dead) then switch scene to game over
To make a congratulations switch try making a region and then set it so when your actor goes into the region you switch the scene to the congrats scene.

If that is the case, then I have an Idea on how you can tackle this.

What I would do is I would create a list. This list would contain each of the actor types in which you wish to be randomly selected and used in a battle. You would then pick a random number and use that number to get the specific actor type from the list. This number is basically a representation of the index in the list in which the actor type resides.

I have attached a very simple sample behavior that will show this in more detail. Ask if you have questions on anything. In regard to getting the specific actor type the line of code you need to use is.

Code: [Select]
_ActorTypeAtt = getActorTypeByName("String Representation of actor type");
In the screenshot don't worry about the x/y of the spawn location being 0, that is up to you to figure out. Also, I have attached a screenshot that shows what the values stored in the list might look like. The values must match exactly as they appear when viewing the actors in the game center.

Edit: Oh and please note that there are underscores in front of each attribute in the code block. Since I was using a code block, I had to use the internal name of each attribute.
Is there a place I can learn about some of the things I can put into the code block?

Resolved Questions / Re: Actor Types
« on: July 07, 2011, 07:02:15 pm »
If you're making the actor and then telling it to do something use the "last created actor" to give it an attribute name so you can always reference it.

In other scenarios you can use the "for each actor of type (choose actor type)" or give the actor a behavior that is checked for when something happens (see the "inflicts damage" behavior in "Run and Gun Example").

Also actor types are the things listed as "actors" under the game center. They (unlike actors) have shared behaviors, animations, and a few other things while actors are essentially what actor types become once you stick them into the scene.

Making a new actor type puts an actor into the scene with all the behaviors and animations etc. that you attached to the actor through the game center but without any of the specific details such as an attribute name or set x and y or anything like that.

Hopefully this explanation helps.

You'd probably have to use a code block to do this at the moment.  If you can provide more details as to what you're attempting to accomplish with this, maybe we can also find an alternative way to do it.
I'm trying to make a basic rpg system where you walk into fights a la Final Fantasy. What I was trying to accomplish was a spawning system where it picks some enemy types randomly (based on location) and then spawns them.

So a fight would break out and you would get a spawn type goblin and spawn type phoenix or whatever happening in the scene that was switched to.

I had considered the option of:

Code: [Select]
_type1 = getActorType(_type2);
Where _type 1 and _type2 are both Actor type attributes. The problem with that though is getActorType() requires an INT. So you would have to find some way to get the ID for an Actor type and use that. Unfortunately, without looking at the API I don't know how to get the ID.
It seems like they should work in the way I described in the original post. Is there a reason this can't happen or will it be able to eventually work?

If it's still not clear what I was trying is shown in the below picture. Actor 1 and actor 2 are actor types and actor 2 won't go into actor 1.

I have 2 attributes made, both are actor types and I want to set one to the other. So I grab my setter piece for my actor type 1 (I'm grabbing the drop-down piece) and try to drag the getter piece for actor type 2 on top of it but to no avail.

Can you not do this or am I doing something wrong?

Archives / Re: Text + Text
« on: July 05, 2011, 04:22:11 pm »
Thanks, was trying it with the + designed for numbers.

Archives / Text + Text
« on: July 05, 2011, 02:39:19 am »
In python you could add strings of text together and I always thought it was pretty handy.

For example if in stencyl you had a number and wanted to send it in a unique way you could do something like [as text: ability] + [as text: 1] and end up with ability1 which would be pretty useful.

Could we see this functionality in Stencyl (or if it's already there how do you do it)?

Ask a Question / Set Actor For Behavior With Code Blocks?
« on: July 05, 2011, 01:02:19 am »
Sorry if the title doesn't seem clear but I didn't know how to phrase it.

Is there a way to set actors in behaviors (check image for what I'm talking about) with code blocks?

Also is there a way to fetch this information (which actor is set to which attribute) or set a default so when I spawn a new one it already has an actor in that attribute of the behavior?

Resolved Questions / Change Background Through Behavior?
« on: June 30, 2011, 09:53:19 pm »
Is there a code block to change the background mid-scene? For example if you activated a trigger and the background (let's say a castle in the far distance is destroyed and now the destroyed parts lie in the background) changed could you just change which background was set to match it or would you have to use an actor?

Ask a Question / Send message with unique variable
« on: June 28, 2011, 01:35:43 am »
Is there a way to send a message with a unique variable? For example, say you have a game with damage and hp, if you send an attack for 20 damage it gets sent as damage(x) and is received by another behavior where it takes the damage and throws some modifiers on it (like defense and such).

An example is attached below.

Ask a Question / Make Tiles Collide (Block) Players Movement
« on: June 26, 2011, 09:08:00 pm »
How can I make a tile block a players movement. In "RPG Town and Dialog" you use custom blocks but there must be a way to make it work without them.

I stuck what I tried onto Stencyl forge as "My First RPG". Try it and notice how the player moves through the tiles with collision, why is this?

Ask a Question / Setting a "trail" on an actor that shows movement
« on: June 21, 2011, 07:45:31 pm »
How could you make a trail of sorts that moves and shows the movement of the actor it is following.

If I'm not clear an example would be having flames that follow behind a fireball and when the fireball goes upwards the fire is below the ball, when it is going up and to the left it is below and to the right, etc.

Pages: 1 2 3 4 5