Game Development Community

Question about weopon switching

by Dakota Cooper · in Torque Game Builder · 01/24/2010 (4:04 pm) · 2 replies

I have been having trouble with weopon switching. I'm not sure how the game would know if you have the weopon already or not, possibly getword? A few more issues with it would have to be the animation switching with it. I dont know how i would change the animations, would i switch every animation out with a completely new one? if so, how to i do that? The last question is how would i tell the game that with wep1 the damage is 10, wep2 the damage is 5, wep3 the damage is 20, etc?

thanks for your help.

About the author

Recent Threads


#1
01/24/2010 (4:56 pm)
Your questions are so vague that they're difficult to answer. For example, the getword() function knows nothing about weapons. It simply takes a string of words and a number N as arguments, and returns the Nth word from the string. That might be a useful thing to do in your weapon-switching code, or it might not - it depends on how you've written that code.

It sounds like you need to take a step back, and learn the fundamentals of programming, object-oriented programming, and TorqueScript.
#2
01/24/2010 (5:18 pm)
I know the basics of programming but the way I learned makes it hard to adapt it to the game. I was tought through a tutorial and the only thing it used was Hello world and it's "keybinding" tutorial only taught me how to make the console echo true if i held the up arrow and when i released it it would say false. Didn't tell much on how to adapt it into the actual game.

EDIT: I only suggested getword() because I have seen it in similar code to what I am doing. I'm not really sure as to what it can do in a game.