Under rating threshold (hideshow)
Might be a double post, but it doesn't seem to have posted my first comment.
Somehow when I include the code as a behavior, my actor won't shoot anything, but works when I include the code in the actor's event thing.
Did you remember to attach the behavior to the actor? That is the issue with behaviors: it's easy to forget to "attach to actor" (the big green button in the upper-right).
Under rating threshold (hideshow)
What to do when your own bullets hits your own actor? Cause I cant get the bullets in front of my actor so he can shoot the enemies. My actor hits himself and then the bullet is gone
In the Actor -> Position palette, you can find the "direction self is facing" code. Then, you can use that as the angle for the bullets (please note, you may have to add/subtract 90 from it to make it work correctly, depending on how you setup your actors).
Under rating threshold (hideshow)
I'll probably never really make a video game but knowing alot about how they are made really shows me how much people work on them, which helps me respect even weaker games. I CANNOT believe it is so complicated, but if you practice, you can even make a totorial on making a game, huh? :)
Aye, for the most part, you can estimate at least one hour of programming per MINUTE of gameplay (varies a lot depending on if you are making a mini-game or a full-fledged game).
Under rating threshold (hideshow)
OMG I really need your help to make my game.What ever I do it sometimes work like I cant get score I cant find out how to make the enemy's move left to right by them self because I am trying to make a maze game so I cant have the enemy's spawning all over the place.Please help me I would love you if you did help me. <3
Under rating threshold (hideshow)
I have to admit that this tutorial is best if you need help in starting "programming" in stencyl, very usefull and simple. tuvm.
Are you sure you used a "do every" instead of "do after" code? If you want, upload the game to Forge and send me a PM with its name and I'll take a look at it to see what's wrong.
Are you sure you attached the behaviors? If you want, upload the game to Forge and send me a PM with its name and I'll take a look at it to see what's wrong.
My graphics are generally pretty bad too, unless I spend a LOT of time on them. That come down more to networking. There are forums on Stencyl.com to find artists/musicians to work with or DeviantArt is another good choice.
Under rating threshold (hideshow)
Oh, I accidently did create bullet at (x:x of self, y: x of self.) by the way the bullets weren't going where i clicked, they were going at what seemed to me as random places, and I just happened to click on two in a row and assumed wrong.
If you want, take a screenshot of the code and send me the link (or just upload the game to StencylForge and send me the title). You likely have some correct coding in the wrong spot, such as putting the bullet creation in a scene behavior instead of the player behavior.
Under rating threshold (hideshow)
I would love it if at the end you showed a picture of all the coding you changed so I could fix my mistakes without having to go through the tutorial at the end.
There are so many areas that can change that it's hard to do a screenshot of all of the updates... would require a couple of slides just to show all of the code. I tried to do something similar by having recaps, but I know it's not quite the same thing.
Under rating threshold (hideshow)
I followed your tutorial again and saw i used "Group for this actor's colliding shape" instead of "group for colliding shape". Now the bullets work properly. But may i ask you what is the difference between those 2.
P.S. Thanks for your help but i may keep asking questions later on but right now I'm doing good.
The "group for this actor's colliding shape" is a very rarely used code, but it is indispensable to some programmers. It is designed for those who use multiple collision shapes on a single actor, such as animation that includes a sword. Those animations can have multiple different groups attached, and that code allows programmers to figure out which one was hit. For the majority who use one collision shape per actor, it's not needed.
Under rating threshold (hideshow)
Yes the collision groups are okay. The bullet hits what i want it to hit but it does not seem to follow the "Kill Self" command.
Under rating threshold (hideshow)
I actually figured out what i was doing wrong after i posted that comment. I have one problem (sadly) the bullets wont disappear when they hit an actor and the actor does not die by the bullet. I don't know what i am doing wrong. please Help Again.
Under rating threshold (hideshow)
I followed your tutorial but then realized you were shooting from a previously made actor. I want to know how to shoot directly where your mouse is (out of nowhere). Please help.
If you want to shoot directly at the mouse, no movement (like in a shooting game), just use the "x of mouse" and "y of mouse" coding alone, without any subtraction. If you want to shoot things directly, then just use "if mouse was released on self" coding in the actor's code itself. Does that make sense?
In your Game Center, check your collision groups and make sure your bullets aren't colliding with your player, which could cause them to bounce off, making them go in only one direction.
Under rating threshold (hideshow)
hi abigayl, thanks for the tuts! they were great, easy to follow and entertaining. here is my version, because i use a laptop i opted for a space button gun, with a spray of +-10px. i also made enemys face the direction they are flying which i though made it look so much better. i plan on creating stages and more weapons via powerups. thanks again
http://www.kongregate.com/games/screaminpoet/stencyl-tutorial-shooter
Under rating threshold (hideshow)
Guys, just learn how to code in a REAL language, coding a game like this in a real language would take far less more time than it would in Stencyl.
It's not all about speed (and Stencyl is fast) but rather easing into programming. As I have said many times before, if you know how to code in AS3 or another language, you should probably stick to that. Stencyl is a good stepping stone though. You don't go straight to Calculus without first learning about functions ;)
I read all comments. To make the actor point towards the mouse cursor, follow the same idea in this tutorial (with the arctan2 coding) but instead of setting the bullet's velocity in that direction, use "point self to x degrees" under Actors -> Position. Note that I think you have to add 90 degrees to the amount you get for the pointing to work properly, and in order to point continuously, it will need to be in the "always" heading... I will caution you that doing a trigonometric function in an "always" heading can lag the game a bit, so I would not advise using the code if it is an intensive CPU game. Hope that helps.
Under rating threshold (hideshow)
ah i see..so, for the sake of example: things like character/enemy attributes (hp, strength, etc.) are better used to local attributes while things like..say.. Day/Night time should be a global?
Under rating threshold (hideshow)
alright i got it...seems i forgot the whole local/global attribute thing. :s Thanks Abi.. ^-^
Also, on a side note, i decided to make a key press to start the game from title screen than clicking the start button.
Just so i stick it in my head...what is the big difference between a local and global attribute?
Aye, key presses are good. The difference is that local attributes are ONLY used by the current behavior (and for each individual actor, aka: multiple enemies with the same behavior can have different local attribute values). Global (game) attributes are used by any behavior, and if the value changes one place, it changes everywhere. Also, local attributes are not saved/loaded whereas game attributes are.
Under rating threshold (hideshow)
Found the problem..but i can't do anything about it. It's the Increment/Decrement...it won't let me change it from "number" to HP. Yet i created the HP attribute as a "number". Also of note, i only have 4 options when making an attribute while your Tutorial shows...more. Either i'm running an old version (which seems odd cause i got it less than a week ago) or..i dunno. *confused!*
Chaz, the issue is likely that you are trying to use a game attribute (purple) for the HP when you should be using a local attribute (blue). Try making a new local attribute for HP and use that instead. Let me know if it still glitches.
Under rating threshold (hideshow)
Upon some messing around..it's something with the HP code..when i removed it i could test my game..when i put it back in..i couldn't. hmm..must of missed something.
Under rating threshold (hideshow)
Hm..strange...after finishing this tutorial i can't even test my game..it just goes through the motions then...dead. Nothing. I restarted Stencyl but still nothing...hmmm
Under rating threshold (hideshow)
I followed the tutorial but when i click in my game i just start to turn around and the bullets just stay at the player Do you know how this is possible?
Love your tutorials!
Like the idea how you make them
Are you sure you attached the bullet movement behavior to the bullets? If you didn't, they will just stay at your player. If you did, then please screenshot it and send me a link. My livestream (livestream.com/poweredbyflowers) is the best way to reach me for one-on-one help.
Under rating threshold (hideshow)
Really helpful tutorials, maybe I'll finally get off my lazy ass and start making a game myself. One thing: the information on how to switch pages in the tutorial is on the 2nd page. Not very practical. I know I can always scroll down a bit for the controls, but I think it's my OCD talking now :P
I don't know how to put the controls on the first page without destroying the welcome message... perhaps instead of the Stencyl logo... would need some feedback if that sounds good though. I tried to use the simplest advance controls, ones I would hit personally.
Under rating threshold (hideshow)
I would like to see and learn how to make a realistic gun. How to add recoil, gravity to bullets, knockback and other stuff.
Will keep that in mind for future tutorials, but it's a lot more complicated than this, so might be much later to see if I can even simplify it to a tutorial.
Under rating threshold (hideshow)
best tutorial ever!!!!! i changed up a few things in it and instead of my mouse as the aim and shooter i made my space bar because i learned alot from you.
5/5 just as i rated your other tutorials
Thanks Snackman. I'm glad to be able to help :). I'm also happy to hear about people taking my ideas and making them their own. My desire is not to see a bunch of copies but rather people expanding on the ideas I laid out, which it sounds like you are doing.
Under rating threshold (hideshow)
I managed to fix this using a boolean flag similar to how you restricted the firing speed in the previous tutorial. a "do after 0.05 seconds" block to reset after decrementing the HP was sufficient.
Thanks, yes, I have had that problem in the past (took me a while to fix in Holiday Block Breaker), and that is indeed the fix. I rated up your comment so hopefully others will see it too (unfortunately, my base file for tutorial 4 was damaged so I cannot update it directly).
Under rating threshold (hideshow)
Hi Abigayl, I want to start off saying I love your tutorials, they're very helpful.
I have a problem with the way you've coded the HP attribute. I have followed your coding exactly, but bullets subtract 1 or 2 health from enemy targets, and very rarely even 3 HP per bullet. ( and I noticed this problem in your demo as well, its just masked by the large number of bullets, and thus hard to notice if one bullet is doing 1 or 2 damage to a 3 HP target.)
Is there any way to code the HP so that this does not occur? any insight into why this is happening at all?
Recap: I set enemy HP to 10. I code so that if HP > 1 to decrement HP by 1. else kill.
I print the HP value rather than a picture bar. about 40% of the time, One bullet takes enemy from 10 HP to 8 HP. Rest of the time, HP from 10 to 9. Halp.
Aye, you are correct and yes the sheer number makes it so I missed that error. The simplest way to correct it is to add an extra code in the "EnemyMotion" behavior. Just before the "if HP > 1", drag in a kill code (from Actor -> Properties) and change it to say "kill last collided actor". That should work.
Under rating threshold (hideshow)
my bullet is just weird looking i dont even see it on the screen. idk plz message me back threw pm and help me cause i rlly wanna become as good of a game maker as you
I've replied to the PM. I highly advise coming to the livestream for one-on-one help. Even if I am not on, there are other regulars there who might be able to help out.
The next tutorial goes over how to make a powerup, which you should be able to manipulate to change shooting or other things (I suggest using a game attribute for something permanent like that). If you want me to show you how to change it after the tutorial comes out on Saturday, let me know and I can stream it for you (livestream.com/poweredbyflowers).
Under rating threshold (hideshow)
Maybe in the future, you can explain how to make power ups and bonuses. (ex. one that gives you more damage for a few seconds and one that gives you a few hundred points)
Under rating threshold (hideshow)
Really enjoying the tutorial series, wonderful step by step approach. I think the way the development of the tutorial game has progressed, it would be interesting to see each new development as an additional level, with the design for integrating levels into a game, with progress indicators, checking the score or achievement on each level to progress, a selector on the opening screen for picking opened levels and how to save level progress for the user between games in the sol / saved information.
Seems like my last reply got deleted somehow... I will try to fit as much of that into Tutorial 5 as possible. Thanks for the suggestions :) EDIT: I have just finished the foundation for Tutorial 5, and unfortunately, level select does not fit, primarily since I need to have multiple levels to show how to do a level select coding...
Under rating threshold (hideshow)
I hope it's not the last one! I've just need to study trigonometry a little bit (as well as English)) and I hope I'll make at least one stupid game) Oh, my mistake, I should say thanks first! Thanks a lot!!!
lol, you're welcome. I'm glad to be of help :). The fifth one will be the last one for a while. (I may do a second set focusing on platformers when SW2 comes out).
Unfortunately, I cannot. I am almost up to the maximum horizontal size allowed and to make the pictures bigger would increase the file size quite a bit :(
Under rating threshold (hideshow)
Abigayl, thanks again for a wonderful tutorial. I think you are covering Stencyl at a really useful pace. I've been poking around the program for a few months, but have always run into problems figuring out how to do things. I'm beginning to understand the steps that need to be taken. Even though I'm not working on an 'avoider' game, this has helped me with what I am doing. Oh, and it has also reminded me that I'm a little rusty on my trig, need to crack open some old math books. I'm really enjoying this series and it is helping me a lot. I'll be eagerly awaiting your next tutorial.
Thanks Zhane :). The fifth tutorial will be my last for a while. I am glad to see that people can look past the idea of this being an avoider game and use the actual concepts to help them with their own games :)
Under rating threshold (hideshow)
I am curious at how many people come to these tutorials just to play the game at the end, using "2" to skip there. If you are one, please rate this comment up (else please don't :P). Thanks.
Under rating threshold (hideshow)
Please rate this comment up if you would like to see more tutorials about Stencyl (and please comment yourself about what you would like me to cover) so that I know what you are interested in seeing. Thank you.