Page 1 of 1

weapon equip

PostPosted: Wed Jun 06, 2007 6:24 pm
by Fabiomafia1298
how can i get my character to equipt a weapon and shoot that weapons when equipped?
PS some nice weapon animations would be nice if anyone can post any. im not that good at drawing.

PostPosted: Wed Jun 06, 2007 6:51 pm
by Sgt. Sparky
weapon drawing:
I could make the Weapons for you! :D

weapon equiping:
make a variable(integer) called Select.

on the event that triggers the weapon change(example, the 1 button.)
Code: Select all
Select = 0;

when the 2 button is pressed,
Code: Select all
Select = 1;

ect.
on the draw actor event of your Gun actor(make is seperate from the player.)
Code: Select all
if(Select == 0)ChangeAnimation("Event Actor", "Gun_1", FORWARD);
if(Select == 1)ChangeAnimation("Event Actor", "Gun_2", FORWARD);
//ect.

or for a Side Scroller make an extra variable called dir(integer).
when the player presses the left key(repeated) dir = 0;
when the player presses the right key(repeated) dir = 1;
and on the draw actor event of the Gun,
Code: Select all
if(Select == 0) {
if(dir == 0)ChangeAnimation("Event Actor", "Gun_1left", FORWARD);
if(dir == 1)ChangeAnimation("Event Actor", "Gun_1right", FORWARD);
if(Select == 1) {
if(dir == 0)ChangeAnimation("Event Actor", "Gun_2right", FORWARD);
if(dir == 1)ChangeAnimation("Event Actor", "Gun_2left", FORWARD);
                      }
//ect.

:D
if that does not help I will make a Demo. :D

PostPosted: Wed Jun 06, 2007 11:20 pm
by Fabiomafia1298
a demo would help. this is a little confusing for me.

PostPosted: Thu Jun 07, 2007 2:28 am
by Sgt. Sparky
allrighty,
I will make on real fast. :D

PostPosted: Thu Jun 07, 2007 2:55 am
by Sgt. Sparky

PostPosted: Thu Jun 07, 2007 3:15 pm
by Fabiomafia1298
thanks man

PostPosted: Sun Jun 10, 2007 3:13 pm
by Sgt. Sparky
you are welcome. :D