Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → FireProjectile
FireProjectile
2002-01-18, 2:12 PM #1
Ok, what I'm trying to do is make it so I can use a variable in fireprojectile. But it comes up as y_vec being = 0.
My code:

y_vec = 1;
weappos = FireProjectile(player, posghost, -1, -1, '0 y_vec 0.0 ', '0 0 0', 0, 0, 0, 0);

I also tried:

y_vec = 1;
weappos = FireProjectile(player, posghost, -1, -1, '0, y_vec, 0.0 ', '0 0 0', 0, 0, 0, 0);

Anyone got any ideas?
Team Battle.
2002-01-18, 2:46 PM #2
AFAIK, you cant use variables in vector strings. Use something like this:

Code:
y_vec = 1;

variable = vectorset(0, y_vec, 0);

Weappos = Fireprojectile(Player, Posghost, -1, -1, variable, '0 0 0', 0, 0, 0, 0);


You need to assemble a complete vector. So, use 'Vectorset()' to compile one.

Fairly easy stuff. [http://forums.massassi.net/html/wink.gif]

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-01-18, 4:46 PM #3
Ahh poo. I knew I was doing something wrong... just didnt realise it needed to be a vector. Thanks very much.
Team Battle.

↑ Up to the top!