Attacking in smash bros

Non-platform specific questions.

Attacking in smash bros

Postby BlarghNRawr » Wed Jun 25, 2008 12:49 am

How do i make pl1 attack pl2 only in the attack animations, instead of on every collision?
if that makes sense...
Last edited by BlarghNRawr on Sat Sep 20, 2008 5:21 pm, edited 1 time in total.
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: HELP!! I NEED HELP!!

Postby makslane » Wed Jun 25, 2008 12:54 am

In the Collision event (or any other event you want) instead add the action as an "Immediate action", add as "Wait for frame action" and set the animation and the frames thats the action must happens.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: HELP!! I NEED HELP!!

Postby BlarghNRawr » Tue Jul 08, 2008 1:11 am

how do i make that work for the whole animation instead of one frame in the animation?
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: HELP!! I NEED HELP!!

Postby DST » Tue Jul 08, 2008 3:41 am

Create a variable for each player; attack1 and attack2, global, integers.
On keydown>attack button>player1
Code: Select all
attack1=1;


Then on player1>animationfinish>attackanimation:(use the 'wait for frame' here:)
Code: Select all
attack=0;



so on player2>collision>anyside>player1:
Code: Select all
if (attack1==1){get hurt code here;}


Now it gets just a tiny bit more complicated. You only want to be hurt by the attacking side of player1, not his backside.

To determine sides of player is easy; make a variable called face, actor integer.
When player1>keydown>right:
face=1;
and on player1>keydown>left
face=0;

So now you can combine them, which actually means splitting the event into two;
one is collision>leftside>player1:
Code: Select all
if (attack1==1 && player1.face==0){ get hurt}

And collsion>rightside>player1:
Code: Select all
if (attack1==1 && player1.face==1){gethurt}


Two things i'd like to point out here:
1: i described this all as though i were player2
2: i used two different variable methods. One is actor integer, in which i said "player1.face", and the other was global integer, in which i said "attack1".
You can use either method, which ever works for you.

Global integers: Cons: require new integer, or array cell, for each actor who uses them. Pros: Can be saved. Simple To call.
Actor Integers: Cons: cannot be saved without rerouting them to a global integer. Must state actor name before stating variable, when called from another actor. Pros: can be used for any number of actors.

Hope this helps. If you have any questions, just ask!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Attacking in smash bros

Postby BlarghNRawr » Sat Sep 20, 2008 5:22 pm

:oops:
can someone please simplify this for me?
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Attacking in smash bros

Postby smallville » Sun Sep 21, 2008 6:38 am

OK i hear what he is saying..........forget that,
anyway you don't have to understand it just follow the instructions and YAY you have a fighting game! :lol: :D
otherwise just download the "fighting demo" in the demo forum....i think that guy with the instructions
made it....
ReDgame 2009
current projects:
S.W.A.T: a shooter/ freeroamer (sort of) with a unique story and a TWIST
User avatar
smallville
 
Posts: 54
Joined: Mon May 05, 2008 9:05 am
Location: Location: Location: Location: location: Loca....
Score: 3 Give a positive score

Re: Attacking in smash bros

Postby BlarghNRawr » Sun Sep 21, 2008 10:04 pm

nevermind, i got it!
(now actual production can actually begin on my game :D )
i just got rid of the sides cuz my players are too small for it to matter
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Attacking in smash bros

Postby BlarghNRawr » Sat Sep 27, 2008 12:40 am

YAY :D
it worked!
and now variables ACTUALLY make sense to me :D
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron