2006.10.22, 07:48 PM
Pages: 1 2
2006.10.22, 08:17 PM
Code:
var punchnum;
foo
foo
foo
punchnum=0;
foo
foo
foo
if (punchnum=0) {
punchnum=1;
obj.model.animation.start('punch1')
}
else {
punchnum=0;
obj.model.animation.start('punch2');
foo
foo
foo
.(you didn't geuss that???)
2006.10.22, 10:28 PM
More like:
I think that would be more accurate.
PS: Sry for spaces, they all-the-sudden started being stubborn.
Code:
if ( subEvent==DIM3_EVENT_MESSAGE ) {
if ( id==DIM3_ID_SHOOT_PUNCH_RIGHT ) {
obj.model.animation.start("Punch1")
}
if ( id==DIM3_ID_SHOOT_PUNCH_LEFT ) {
obj.model.animation.start("Punch2")
}
}I think that would be more accurate.
PS: Sry for spaces, they all-the-sudden started being stubborn.
2006.10.23, 12:09 AM
Umm... no, why the hell would u be using messages in the fire function? I would also make punchnum=utility.random.getBoolean() at the beginning to make it start off with a random fist.
2006.10.23, 12:18 AM
Because when you get the input from keys you use messages. For mouseclick just use firemethods. But you'll still want to probably be able to set them as keys...
But on the other hand, you don't necessarily need them. You could use fire methods for keys... yeah... Doesn't really matter.
But on the other hand, you don't necessarily need them. You could use fire methods for keys... yeah... Doesn't really matter.
Code:
var method=weap.fire.method;
switch (method) {
case 1:
case 0:
case 3:
obj.model.animation.start("Punch1")
return;
case 2:
obj.model.animation.start("Punch2")
return;
}2006.10.23, 01:46 AM
Just use a variable to alternate between 0 and 1 with 0 being punch animation right and 1 being punch animation left. 

2006.10.23, 01:54 AM
I misread him sorry. I thought he meant (like in marathon) the primary trigger punches right and the secondary punches left. O.o No big deal, still useful code.
PS: Alfonso, I suggest getting a number between 0 and 4, if it's 0, 1, or 2 have it punch right, and if it's 3 or 4 punch left. That way it punches right more. (most people are right-handed)
PS: Alfonso, I suggest getting a number between 0 and 4, if it's 0, 1, or 2 have it punch right, and if it's 3 or 4 punch left. That way it punches right more. (most people are right-handed)

2006.10.23, 04:40 AM
Ah, but I take martial arts, and I happen to know that if you alternate you can get in 3 times more hits than if you use your right more.
2006.10.23, 05:46 AM
Strange he didn't think of an alternating boolean variable. 

2006.10.23, 10:47 AM
Yeah but who needs that when you can knock them out in one all-mighty right-handed punch?
Pages: 1 2