i cant make my behaviors work

i am trying to make my charactor die  when it touches a spike so i used the  kill actor when touched behavior  by megaman98 but it wont work even though there is nothing to configure and i put it in just as it says in it so any one know whats wrong

Tuo

  • *
  • Posts: 2469
I strongly suggest doing a tutorial series (the rest of the tutorial series is in the "updates" section) instead of relying on premades. Not only will you then be able to much more readily debug, but you will also learn the coding part (which isn't as bad as it seems at first) so that you can do so much more than just the premades allow:

http://www.kongregate.com/games/Abigayl/stencyl-2-0-tutorial-1-basics
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

I strongly suggest doing a tutorial series (the rest of the tutorial series is in the "updates" section) instead of relying on premades. Not only will you then be able to much more readily debug, but you will also learn the coding part (which isn't as bad as it seems at first) so that you can do so much more than just the premades allow:

http://www.kongregate.com/games/Abigayl/stencyl-2-0-tutorial-1-basics

well that dousent help me i only want my hero to die on contact with spikes jeeze i dont need to know how to program for that so could someone just tell me whats wrong and how to fix it

UnrealCanine

  • Posts: 244
Can you post a screenshot of the code?

Can you post a screenshot of the code?

i dont think my computer can do that but the behavior is kill actor when touched behavior which was made by megaman98 does that helpcause i really cant get it to work

Your best bet is to listen to the advice TUO gave you as not many people are not  going to hold your hand and  do the code for you.


but i will try and  help you

 the code is simple just use a collision event block that says

when self hits actor of type(spike)
kill self

also make sure the main player is in the right collision group as well as the enemy, make sure they can collide with each other

also be respectful when someone is trying to help you even if they do not give you the information you want.

look i just want  to use the behavior  i dont think i have to program a new one  just to make them die at the spikes since it is such a simple one okay now can you guys just tell me whats wrong with it

Ryusui

  • Posts: 827
i dont think my computer can do that

Yes it can. There's a little camera icon in the bottom-right of the design mode editor. Click that, then save your screenshot. You can upload your attachment to your post by clicking "Attachments and other options" under the text box.

Now. Show us what's going on with your code and we can help you. We're good at this, but we're not psychic, and you won't get any better (or faster) answers by being hostile.
In the event of a firestorm, the salad bar will remain open.

Meestar

  • Posts: 654
Most of us code helpers are too busy/lazy to hunt down a behavior on the Forge, especially if there is the possibility of the end user having made modifications to it.  We much prefer having things readily available that we can glance over.  A screenshot will allow us to quickly review your code for any errors and help us help you in fixing anything that might be going on.

By being hostile, as Ryu put it, we're more likely to just move on than answer your question.

Tuo gave some good advice, just as he always does, and therealistone gave you the exact code you need to kill something on touch.  Tuo's link would also have given the right code.  Sometimes it is best to start from scratch and do things yourself.  I've personally re-written code many times from scratch that were 50 or more blocks long.

The more info you provide us with (such as a screenshot), the better we can help you fix the code you have.  Sometimes pre-made code doesn't always work. We are always willing to help out a person in need as best as we can.
PM me if you require help.  I'm always glad to help out!

Ryusui

  • Posts: 827
Plus there's the simple fact that when you do eventually need to do something in your game that you can't find a premade behavior for, you're going to need to program it yourself.

So it's never too early to learn.
In the event of a firestorm, the salad bar will remain open.