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

Pages: 1 2 3 ... 10
1
Ask a Question / Re: Code Help, Please!
« on: February 18, 2017, 06:34:20 am »
If you have an unknown number of any attribute, you can replace the attribute with a List. A List allows you to dynamically change the number of clones of the same attribute.
In your example, you can have Missile be a list of actors instead of a single actor. Then you can iterate (go through) the list of existing missiles and set the dAM for each of them.

Unless you need to keep track of dAM after it's been used, you can even reuse it for every single missile. Just set the value of the one dAM attribute to the direction of the current missile in the list.

More info on lists here: http://www.stencyl.com/help/viewArticle/73

2
Ask a Question / Re: Game Size
« on: February 16, 2017, 12:54:07 pm »
Have you tried "Clean Unused Project Files" from the menus?

3
I guess the easiest way would be to find out what Y value the head starts at and check if the projectile/weapon hits above that Y level on the enemy actor. I'm sorry, don't have access to Stencyl at the moment, so I can't show you example code.

4
Ask a Question / Re: Generating sounds, notes and other stuff
« on: February 15, 2017, 11:33:47 pm »
Two ways to go about playing short and long notes:
Have only long sound files, one for each note, where you have a cut off (stop playing sound on channel) if the note is short.
Have both a long and a short sound file for each note.

As for how to determine when to play long or short, it depends on the type of thing you're doing. If long is by something like a switch (like a sustain pedal on a regular piano), the second one should work fine. Just switch to the long notes when the switch is on, a boolean should work fine.
If it's when the player holds down the note, the first one gives you a smoother sound. You could have something like "While Note is Down: Play Note" and after that put "Stop Note" (pseudocode, obviously).

The "Tracker" way of recording is the only way I know of right now in Stencyl. I believe Great Anthony described that better than I can.

5
Well, the log didn't specify any specific behavior, it was all very generic. Since it does mention images though, you can probably narrow it down to any behavior that contains codes for images.
You mentioned stop motion, perhaps the one that handles the animations for those?

6
It's generally easier to find IndexOutOfBound errors in the code than in the log. Any chance you could share a screenshot of your code?

7
Ask a Question / Re: Exporting Resources
« on: February 15, 2017, 11:09:50 am »
Yes, Dashboard is what I meant.
It's the first item under Logic on the Dashboard, right above Scene Behaviors.

8
Ask a Question / Re: Exporting Resources
« on: February 15, 2017, 08:33:37 am »
You can put all the events in an Actor Behavior (from the list on the right on the Home screen) and export that separately from the Actor Type. When importing, import both the Actor Type and the Actor Behavior, then link the behavior to the actor type, and it'll have all the events again.

9
Ask a Question / Re: How to stop animation?
« on: February 15, 2017, 03:25:46 am »
You can make a death animation for the actor that is just a single frame, or the complete animation that it had before, but without the looping (so it stops on the last frame of that animation rather than looping it back). If the actor could have one of several possible animations at the time of death, you can make a copy of each of those animations, remove the looping and then check when they die which animation they have and play the appropriate death animation.

10
Ask a Question / Re: Label-text donĀ“t show on IOS but in Flash?
« on: February 15, 2017, 03:21:31 am »
As I mentioned in the previous thread, Labels were deprecated for a reason. I guess you found out one of those reasons.

I would still recommend that you make each line their own Draw Text block.

You can do it dynamically, with the help of the Get Width for Text with Font block. I've provided a very rudimentary example that you can build from here. It will do the job, but will cut words in half if the line break threshold ends up in the middle of it. I'm sure you can figure out a way around that.

11
Ask a Question / Re: Could Not Create A Game
« on: February 14, 2017, 03:29:25 am »
Would you mind posting the error log? That particular error can have several causes.

A few causes:
Stencyl doesn't have permission to change files in the AppData folders (usually resolved by running Stencyl as Admin, or if you know how, change the permission settings)
An old bug with a beta version of Win10 (fixed by either updating Windows or downgrading to a previous version, like 7 or 8)
A bug with an older build and using certain Font functions (fixed by either updating Stencyl to the latest version or removing every block that changes the fonts in any way)

It would be a lot easier to narrow down what is wrong if we can see the log.

12
Ask a Question / Re: Line Break for text?
« on: February 12, 2017, 11:02:40 am »
You need to go through each element in the QuestionText list and place the elements at the same X but ever-increasing Y.
A bit hard to explain without using an example, but unfortunately I don't have access to Stencyl right now.

You could use the Label system (you have to activate it in the Stencyl settings), but I believe that was deprecated for a reason and I prefer not to use it at all.

13
Ask a Question / Re: Line Break for text?
« on: February 12, 2017, 09:54:49 am »
I believe you will have to make one Text element for every line you wish to display.  You can do it dynamically with a sequence of while's and if's, but that's rather complicated.
I think the easiest way would be to change the QuestionText attribute from Text to a List of other Text elements and put one Text element in the list for every line.

Also, it won't affect your code any, but it will be a lot easier for you to handle if you stick to a single language, instead of mixing Swedish and English like that. The displayed text could still be in Swedish, but I see you have certain things that only the program can "see", such as "Spela_button2", that mixes the two languages. That may be hard to remember once you get to a few hundreds of variables in a couple of dozens of behaviors.

14
Ask a Question / Re: How to set attribute for actor?
« on: February 12, 2017, 05:49:57 am »
In the behaviour for the monster actor, give it a number attribute, call it something like Health or HP.
Make a custom block (New Event->Advanced->Custom Block) and call it something like Hit [enemy name here].

As a parameter when you set up the custom block, add a number attribute called Damage, doesn't need to return anything at all.
Reduce the attribute HP by Damage by using the Decrement Attribute by Number block in Numbers & Text (it says Incriment by default, but you can click Increment to get Decrement).

That's it, you're done. Whenever you need to deal damage to that enemy, just use the custom block from your Custom Blocks section in the right-side menu.

15
Ask a Question / Re: Make multi touch buttons
« on: February 10, 2017, 05:52:15 am »
The answer was fairly simple: Circumvent the bug by manually creating the Touch ID's list. How is that complex?

It's ok to let people know that you have tools for sale that makes life easier, in fact it's a great thing. But to offer that instead of an answer to a rather simple question is what I objected to. If you had mentioned the Touch ID's list and then said something like "and to make things easier, I've made this kit you can buy. It's on sale now", that would have been a completely different story. Instead you made it seem like your kit was his only option and that he should get it quick because the price will rise soon. I hope you see the difference in how it is perceived by the readers.

I'm glad you understood the criticism. I'm only looking out for you. I guess I'm trying to teach something to the guy that taught me how to use this program in the first place :)

Pages: 1 2 3 ... 10