how to make my guy swing a sword and kill actor

Talk about making games.

how to make my guy swing a sword and kill actor

Postby wildmancoyote » Sat Jan 26, 2008 10:36 pm

hey wats up im kinda new to this stuff and so far ive and its kinda made me mad so can somone help me with this whenever you get the chance make a demo or watever
wildmancoyote
 
Posts: 2
Joined: Sat Jan 26, 2008 10:30 pm
Score: 0 Give a positive score

Re: how to make my guy swing a sword and kill actor

Postby alkoh002 » Sun Jan 27, 2008 4:47 pm

I guess you want to do this without any scripts? Heres on way:

1. make a actor called "sword" or fist or whatever. Make so this actor destroys enemy on collision.

2. When player press hit button (ctrl) create actor "sword" in front of the player. Also, when sword is created, make its parent player.

3. On key up (ctrl) destroy actor "sword".

Did you understand?
Current games:
Kreon (rpg) 2%
Gitaaah! (interactive) 5% (paused)

Past games:
Gurkot the game (arcade) 100% (ready)
Aeroth (rpg) 5% (cancelled)
User avatar
alkoh002
 
Posts: 33
Joined: Fri Sep 28, 2007 4:46 pm
Score: 0 Give a positive score

Re: how to make my guy swing a sword and kill actor

Postby wildmancoyote » Sun Jan 27, 2008 7:27 pm

hey sorry to bother you again but i didnt get that totaly im such a newb at this i know
wildmancoyote
 
Posts: 2
Joined: Sat Jan 26, 2008 10:30 pm
Score: 0 Give a positive score

Re: how to make my guy swing a sword and kill actor

Postby DilloDude » Sun Jan 27, 2008 8:46 pm

Basically, what you need to do is first have animations for the guy swinging the sword (without the sword). Set it up so this plays when you press a key. Have another actor that is the sword, which lines up with the player doing the same animation. When it is swinging, set a variable (you might want a few values so you can have a more powerful swing as well), and when not swingin, the variable should be 0. When the sword collides with an enemy, check the variable and do damage accordingly.
The alternate method is to use three actors:
  • One graphic which includes both player and sword, and doesn't collide with anything.
  • One separate mask, which is invisible, which the graphic is parented to. This should do all the events that the player normally would.
  • On attack mask, also invisible (this need only be created when attacking). This does the damage.
Both ways have pros and cons.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron