Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 157
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Old Velocity script isn't working  (Read 310 times)

0 Members and 1 Guest are viewing this topic.

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Old Velocity script isn't working
« on: November 21, 2012, 07:17:48 am »
I tried rewriting an old script I made that changes the players velocity while they are in the air. Can anyone tell me why this script isn't working.

void airmove(float Vx, float Vy, float Vz, float iTime)
{
    void self = getlocalvar("self");
    int dir = getentityproperty(self,"direction");
    int  iTime = openborvariant("elapsed_time");

    if(dir==0){
      Vx = -Vx;
    }

      changeentityproperty(self, "velocity", Vx, Vy, Vz);
      changeentityproperty(self, "tosstime", iTime +130);
}
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Re: Old Velocity script isn't working
« Reply #1 on: November 21, 2012, 07:45:17 am »
I seemed to get the script to work, but now my character keeps freezing when he is done, he is unable to move until he his hit by an attack.
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Old Velocity script isn't working
« Reply #2 on: November 21, 2012, 04:58:36 pm »
What move are you using?

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Re: Old Velocity script isn't working
« Reply #3 on: November 22, 2012, 11:10:25 am »
It's a freespecial move, here's the txt file for it.

anim   freespecial10
   loop   0
   offset   38 109
   delay   4
   hitfx   data/sounds/bukk.wav
   sound   data/chars/Akuma/spin.wav
   hitflash   electo
   @cmd   airmove 5 100
   frame   data/Chars/Akuma/bnew1.gif
   frame   data/Chars/Akuma/bnew2.gif
   frame   data/Chars/Akuma/bnew3.gif
   frame   data/Chars/Akuma/bnew3.gif
   bbox   0
   offset   38 109
   frame   data/Chars/Akuma/bnew4.gif
   blast   5 40 113 35 15 0 0 45
   bbox   0
   frame   data/Chars/Akuma/bnew5.gif
   blast   3 42 108 36 15 0 0 45
   frame   data/Chars/Akuma/bnew6.gif
   blast   8 44 74 27 15 0 0 45
   frame   data/Chars/Akuma/bnew7.gif
   blast   1 39 104 44 15 0 0 45
   bbox   0
   offset   65 111
   frame   data/Chars/Akuma/bnew8.gif
   blast   0 39 90 40 15 0 0 45
   bbox   0
   offset   49 113
   frame   data/Chars/Akuma/bnew9.gif
   bbox   17 10 20 97
   offset   27 114
   frame   data/Chars/Akuma/bnew10.gif
   offset   38 109
   blast   5 40 113 35 15 0 0 45
   bbox   0
   frame   data/Chars/Akuma/bnew5.gif
   blast   3 42 108 36 15 0 0 45
   frame   data/Chars/Akuma/bnew6.gif
   blast   8 44 74 27 15 0 0 45
   frame   data/Chars/Akuma/bnew7.gif
   blast   1 39 104 44 15 0 0 45
   bbox   0
   offset   65 111
   frame   data/Chars/Akuma/bnew8.gif
   blast   0 39 90 40 15 0 0 45
   bbox   0
   offset   49 113
   frame   data/Chars/Akuma/bnew9.gif
   bbox   17 10 20 97
   offset   27 114
   frame   data/Chars/Akuma/bnew10.gif
   offset   37 97
   frame   data/Chars/Akuma/bnew11.gif
   bbox   29 9 42 62
   offset   42 91
   frame   data/Chars/Akuma/bnew12.gifanim   freespecial10
   loop   0
   offset   38 109
   delay   4
   hitfx   data/sounds/bukk.wav
   sound   data/chars/Akuma/spin.wav
   hitflash   electo
   @cmd   airmove 5 100
   frame   data/Chars/Akuma/bnew1.gif
   frame   data/Chars/Akuma/bnew2.gif
   frame   data/Chars/Akuma/bnew3.gif
   frame   data/Chars/Akuma/bnew3.gif
   bbox   0
   offset   38 109
   frame   data/Chars/Akuma/bnew4.gif
   blast   5 40 113 35 15 0 0 45
   bbox   0
   frame   data/Chars/Akuma/bnew5.gif
   blast   3 42 108 36 15 0 0 45
   frame   data/Chars/Akuma/bnew6.gif
   blast   8 44 74 27 15 0 0 45
   frame   data/Chars/Akuma/bnew7.gif
   blast   1 39 104 44 15 0 0 45
   bbox   0
   offset   65 111
   frame   data/Chars/Akuma/bnew8.gif
   blast   0 39 90 40 15 0 0 45
   bbox   0
   offset   49 113
   frame   data/Chars/Akuma/bnew9.gif
   bbox   17 10 20 97
   offset   27 114
   frame   data/Chars/Akuma/bnew10.gif
   offset   38 109
   blast   5 40 113 35 15 0 0 45
   bbox   0
   frame   data/Chars/Akuma/bnew5.gif
   blast   3 42 108 36 15 0 0 45
   frame   data/Chars/Akuma/bnew6.gif
   blast   8 44 74 27 15 0 0 45
   frame   data/Chars/Akuma/bnew7.gif
   blast   1 39 104 44 15 0 0 45
   bbox   0
   offset   65 111
   frame   data/Chars/Akuma/bnew8.gif
   blast   0 39 90 40 15 0 0 45
   bbox   0
   offset   49 113
   frame   data/Chars/Akuma/bnew9.gif
   bbox   17 10 20 97
   offset   27 114
   frame   data/Chars/Akuma/bnew10.gif
   offset   37 97
   frame   data/Chars/Akuma/bnew11.gif
   bbox   29 9 42 62
   offset   42 91
   frame   data/Chars/Akuma/bnew12.gif

I also tried changing the script.

void airmove(float Vx, float iTime)
{
    void self = getlocalvar("self");
    int  iTime = openborvariant("elapsed_time");
    int dir = getentityproperty(self,"direction");


    if(dir==0){ // Facing left?
      Vx = -Vx ;
    }

      changeentityproperty(self, "velocity", Vx, 0 , 0);
      changeentityproperty(self, "tosstime", iTime + 110);
}
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Old Velocity script isn't working
« Reply #4 on: November 22, 2012, 02:59:56 pm »
I don't see a jumpframe.

How do you use this freespecial? Cancel from jump animation?

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Re: Old Velocity script isn't working
« Reply #5 on: November 22, 2012, 04:12:41 pm »
I don't see a jumpframe.

How do you use this freespecial? Cancel from jump animation?

Yes, I actually just now tried setting the aiflag jumping to 1 and the start of the animation and then setting it to zero at the end, it seems to be working fine now.
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal