The Gang Garrison 2 Forum
June 18, 2013, 11:33:51 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Chat with us on IRC: http://ganggarrison.com/irc.html
Server: irc.esper.net, Channel: #gg2
 
   Home   Help Search Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
Author Topic: **Sci-Fi All Stars: Outdated for now**  (Read 36977 times)
Psychopath
Developer In Training
*****
Offline Offline

Posts: 6828

Stop telling me to do things


« Reply #180 on: September 13, 2010, 06:34:50 pm »

I would REALLY like to use more than two frames for walking, but I don't know how to make it do that..
Lines 131-165 of Begin Step of Character may be of interest to you
Code:
if(abs(hspeed)<0.2 /*and not moveStatus = 3*/) {
    hspeed=0;
    animationImage=0;
}    
    
if(place_free(x,y+1)) {
    vspeed += 0.6;
    if(vspeed>10) {
        vspeed=10;
    }
    animationImage = 1;
} else {
//moveStatus = 0;
    if(place_free(x,y)) {
        doublejumpUsed = 0;
    }
}
    
if(speed>15) {
    speed=15;
}
    
if intel {
    if random(1)>0.90 && speed>2 {
        var sheet;
        sheet = instance_create(x,y-11+random(9),LooseSheet);
        sheet.hspeed = hspeed;
    }
    if cloak==true {
        cloak=false;
        cloakAplha=1;
    }
}
    
animationImage = (animationImage+abs(hspeed)/20) mod CHARACTER_ANIMATION_LEN;

Where animationImage = 0 would be the first frame in the walking animation and the standing sprite, animationImage = 1 would be the second frame in the walking animation and the jumping sprite.

CHARACTER_ANIMATION_LEN is a constant that should be modified in order to have more than 2 frames of animation.

Have fun.

EDIT: There is another constant somewhere referring to offsetting the animation due to carrying intel, the name escapes me at the moment.

EDIT2:
CHARACTER_ANIMATION_NORMAL: leave this one alone
CHARACTER_ANIMATION_INTEL: depends on how many frames of animation you want
CHARACTER_ANIMATION_LEN: the number of frames you want
CHARACTER_ANIMATION_DEAD: which frame is the corpse

What I would personally do is change the bits of code where it says animationImage = 0 and animationImage = 1 into animationImage = CHARACTER_ANIMATION_STANDING and animationImage = CHARACTER_ANIMATION_JUMPING, you could create a CHARACTER_ANIMATION_DOUBLE_JUMPING if you want, too.
This is so that your idle and jumping sprites are independent of the walk cycle. I think it would make the mod seem that much more realistic in that manner.
« Last Edit: September 13, 2010, 06:40:43 pm by Psychopath » Logged

Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: Shocked
Killah Zillah
The modding dinosaur and
Veteran Beta Tester
*****
Offline Offline

Posts: 2818


Really long posts are my best friends!


« Reply #181 on: September 13, 2010, 06:45:27 pm »

I would REALLY like to use more than two frames for walking, but I don't know how to make it do that..
Lines 131-165 of Begin Step of Character may be of interest to you
Code:
if(abs(hspeed)<0.2 /*and not moveStatus = 3*/) {
    hspeed=0;
    animationImage=0;
}    
    
if(place_free(x,y+1)) {
    vspeed += 0.6;
    if(vspeed>10) {
        vspeed=10;
    }
    animationImage = 1;
} else {
//moveStatus = 0;
    if(place_free(x,y)) {
        doublejumpUsed = 0;
    }
}
    
if(speed>15) {
    speed=15;
}
    
if intel {
    if random(1)>0.90 && speed>2 {
        var sheet;
        sheet = instance_create(x,y-11+random(9),LooseSheet);
        sheet.hspeed = hspeed;
    }
    if cloak==true {
        cloak=false;
        cloakAplha=1;
    }
}
    
animationImage = (animationImage+abs(hspeed)/20) mod CHARACTER_ANIMATION_LEN;

Where animationImage = 0 would be the first frame in the walking animation and the standing sprite, animationImage = 1 would be the second frame in the walking animation and the jumping sprite.

CHARACTER_ANIMATION_LEN is a constant that should be modified in order to have more than 2 frames of animation.

Have fun.

EDIT: There is another constant somewhere referring to offsetting the animation due to carrying intel, the name escapes me at the moment.

EDIT2:
CHARACTER_ANIMATION_NORMAL: leave this one alone
CHARACTER_ANIMATION_INTEL: depends on how many frames of animation you want
CHARACTER_ANIMATION_LEN: the number of frames you want
CHARACTER_ANIMATION_DEAD: which frame is the corpse

What I would personally do is change the bits of code where it says animationImage = 0 and animationImage = 1 into animationImage = CHARACTER_ANIMATION_STANDING and animationImage = CHARACTER_ANIMATION_JUMPING, you could create a CHARACTER_ANIMATION_DOUBLE_JUMPING if you want, too.
This is so that your idle and jumping sprites are independent of the walk cycle. I think it would make the mod seem that much more realistic in that manner.

Thanks a bunch, Psycho (which happens to be the name of my Pyro)! I'll definitely work on this!
Logged

Psychopath
Developer In Training
*****
Offline Offline

Posts: 6828

Stop telling me to do things


« Reply #182 on: September 13, 2010, 06:48:42 pm »

Just a reminder, I can always be contacted via pm or yahooIM if you have a question for me.
Logged

Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: Shocked
Killah Zillah
The modding dinosaur and
Veteran Beta Tester
*****
Offline Offline

Posts: 2818


Really long posts are my best friends!


« Reply #183 on: September 13, 2010, 06:54:50 pm »

Just a reminder, I can always be contacted via pm or yahooIM if you have a question for me.

Thanks again! It's good to know that I don't irritate the bejeesus out of you with all my questions, especially since I'm kind of thick about coding and stuff.. I was actually worried about that since whenever I ask, I end up getting confused and exacerbating things..  z7
Logged

Dusty
Hero Member
*****
Offline Offline

Posts: 10734


Dust in a box under a table


« Reply #184 on: September 13, 2010, 06:56:00 pm »

Don't worry Zillah, Psycho is like the 'go-to' guy for code help.
Logged


Killah Zillah
The modding dinosaur and
Veteran Beta Tester
*****
Offline Offline

Posts: 2818


Really long posts are my best friends!


« Reply #185 on: September 13, 2010, 06:57:13 pm »

Don't worry Zillah, Psycho is like the 'go-to' guy for code help.

THat he definitely is, and that's why he ROCKS!
Logged

Psychopath
Developer In Training
*****
Offline Offline

Posts: 6828

Stop telling me to do things


« Reply #186 on: September 13, 2010, 06:58:29 pm »

Stop flattering me, I'll get an ego
Logged

Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: Shocked
Spiralstorm
Guest
« Reply #187 on: September 13, 2010, 08:11:21 pm »

Stop flattering me, I'll get an ego

Too late.
Logged
RightBehindYou
Guest
« Reply #188 on: September 14, 2010, 09:52:33 am »

Stop flattering me, I'll get an ego

Too late.
hehe
Logged
Psychopath
Developer In Training
*****
Offline Offline

Posts: 6828

Stop telling me to do things


« Reply #189 on: September 14, 2010, 10:14:45 am »

As an addendum, if you wanted to go all-out, you can even create a frame for falling (from falling off a platform or after reaching the top of a jump).

The only thing to keep in mind is that all classes should have the same number of frames in their walk cycles, and all of them have a frame for each special frame (although a double jump frame would realistically only be used by the Runner, the other classes just won't use it like how the 5th frame is never used by any class)

Hell, if you really wanted to go over-the-top, it's possible to create frames of animation for being juggled with a rocket or airblasted into the sky. Hell, even one for rocket/sticky jumping (although for that, it'd be best to recycle the double jump frame since only the Runner could be able to use it at this time).
« Last Edit: September 14, 2010, 10:18:25 am by Psychopath » Logged

Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: Shocked
[SOS] Hex Alabaster
Hero Member
*****
Offline Offline

Posts: 1671


Ahh, wonderful rust.


« Reply #190 on: September 14, 2010, 08:33:08 pm »

Im not gonna try to read that. My head hurts enough from my school today.
Logged


Psychopath
Developer In Training
*****
Offline Offline

Posts: 6828

Stop telling me to do things


« Reply #191 on: September 14, 2010, 10:54:59 pm »

Im not gonna try to read that. My head hurts enough from my school today.
Logged

Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: Shocked
Floyd Pinkerton
Hero Member
*****
Offline Offline

Posts: 779


Is there anybody out there?


« Reply #192 on: September 18, 2010, 11:43:39 pm »

This is
BRILLIANT!
Logged


Waiting to cut out the deadwood.
Xter7856
Hero Member
*****
Offline Offline

Posts: 581


The Seal of Thanatos has been broken.


WWW
« Reply #193 on: September 20, 2010, 09:48:54 pm »

The mod is EPIC! One complaint: You can't tell which rocket is from which team. Can't wait for final release Woot
Logged

Dinomite
Hero Member
*****
Offline Offline

Posts: 2398



WWW
« Reply #194 on: September 21, 2010, 05:21:10 pm »

I was looking around YouTube and I saw a remix of a very familiar song.

I ask you this, is this music ever used anywhere in this mod?
Techno Dream Trance - Funky stars


The Superburst right?
Is this really Sci-Fi though?  Drolling
« Last Edit: September 21, 2010, 05:22:40 pm by Yoshi » Logged

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.412 seconds with 18 queries.