Game Development Community

Some questions about animations and binding

by Jonathon Bowers · in Torque Game Engine · 02/20/2009 (10:55 am) · 2 replies

I have been trying to find out a few things. I've been trying to get a function so that I can play the death animation on a character and then delete them, I was wondering if there was a way that I could have it call delete once the animation was done, at the moment I'm having it delay the number of milliseconds that the animation takes, but for some characters and objects it goes over and some it doesn't quite finish the animation. In my research I found onEndSequence, but not the syntax of how to use it, if that's the best way to do it, I would greatly appreciate if someone could show me how it's used.

Also, I wanted to bind things to the scroll wheel on the mouse, and I was wondering what Torque calls it for the bind line. not clicking the scroll wheel, turning it, just to make sure there's not confusion.

Thank you in advance for any help you can give.

About the author

I'm a programmer at a video game studio in saint paul, my website has some flash and torque games that I have worked on. www.jonathonbowers.com


#1
02/20/2009 (2:39 pm)
Do you mean the player model being deleted after the death animation, or if you die, your player restarts/respawns the level? Did you try looking through 'starter.fps'? Here are a two scripts I pulled up.

The first is an AI Player script. Just look through it until you find what you are looking for. It is located in (starter.fps/server/scripts/aiplayer.cs).

The second is if you want your player to respawn when killed. Check out (starter.fps/server/scripts/player.cs).

About the mouse wheel, I have no clue. However, I have seen many threads on it. The search bar can be your friend :)
#2
02/20/2009 (4:52 pm)
non player characters, specifically plants and enemies are what I want to play their entire animation and then delete, I ended up finding the mouse wheel code, but every time I scroll my mouse wheel the game doesn't call the function that I identified, it crashes torque for some reason.