About actor

jalet

  • Posts: 16
Hello, how can i make my actor die when he fall on the ground after a long fall? Sorry for my english, i'm french...  :)

Tuo

  • *
  • Posts: 2469
The idea is to store when it first began to fall and at the end see how large it is. You can do it with one number attribute. Something like (Fall being the number attribute):

always
  if (Fall >= 0)
    increment Fall by 1
  if y-speed > 0
    if Fall = -1
      set Fall to 0
 otherwise
   set Fall to -1

When self hits top of tile
  if Fall > 100 (or whatever number you want)
     kill self
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)

jalet

  • Posts: 16
You are very strong... It was very simply for you... Thanks you!

jalet

  • Posts: 16
You may say that i abuse but... And if my actor make a jump before to fall, it's always the same thing? (sorry, i'm new in Stencyl...)

Tuo

  • *
  • Posts: 2469
Sorry, but I can't understand what you wrote. Jump before to fall? Do you mean double-jumping?
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)

jalet

  • Posts: 16
Does your behavior works after a jump too, or he's working only when the actor falls from a platform? (sorry, i take your time... :-) )

jalet

  • Posts: 16
Sorry, I tested your behavior, and everything is ok... You're a monster, and I'm a true noob... Thanks you very much!

Tuo

  • *
  • Posts: 2469
I'm happy to help. :)
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)