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: 161
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Speed up freespecial request  (Read 651 times)

0 Members and 1 Guest are viewing this topic.

Offline Pierwolf

  • Sr. Member
  • ****
  • Posts: 348
    • Pierwolf's Magic chamber of abstract theories about relativity of Karma and metempsychosis
Speed up freespecial request
« on: February 27, 2012, 05:12:05 pm »
Hi guys!

i would like to give one of my chars a freespecial that speed up the char for 10 seconds or something.... i'm sure that there is some script that can do this with ease... someone can please help me with the script?

thanks in advance! :cheers!:

ps. attached is the new character i'm working on: The Barbarian!
My current project:

Knights & Dragons: The Endless Quest - COMPLETE!

Offline MatMan

  • Hero Member
  • *****
  • Posts: 1320
Re: Speed up freespecial request
« Reply #1 on: February 27, 2012, 05:44:52 pm »
There is a edelay function that can be worked in via script but I got it kinda working but not entirely sure on how to use it properly.

You can see a function called increaseedelayforentity in my aniscp.c file if you want to see if you want to try to get it working.

edit.
this is the function..
Code: [Select]
EDelay {adj} {minimum} {maximum} {range min} {range max}: Model level delay adjustment.

{delay}: Added to original delay. Negative numbers speed up animations, positive slow them down.

{min}: Shortest total delay possible.

{max}: Longest total delay possible.

{range min}: No original delay equal or lower will be adjusted.

{range max}: No original delay equal or higher will be adjusted.

Script
int X = getentityproperty({target}, "edelay", "{property}")
-{Property}:
--delay
--min
--max
--range_min
--range_max

changeetentityproperty({target}, "edelay", {delay}, {min}, {max}, {range_min}, {range_max})
« Last Edit: February 27, 2012, 05:46:30 pm by MatMan »

Offline becker

  • Full Member
  • ***
  • Posts: 105
Re: Speed up freespecial request
« Reply #2 on: February 27, 2012, 06:02:54 pm »
I use Edelay in my mod. It goes in the character file header. Make a copy of your character's text file. Make the copied character a weapon. Put Edelay in the model header. Have the original character can have a freespecial that equips a weapon with weaponframe. They turn into the faster version when you do the freespecial. The part I do not know how to do is make it only last 10 seconds.
To double speed you can do Edelay 1 2.0 1 999 1 999. That will multiply all delays by 2.0.

Offline Pierwolf

  • Sr. Member
  • ****
  • Posts: 348
    • Pierwolf's Magic chamber of abstract theories about relativity of Karma and metempsychosis
Re: Speed up freespecial request
« Reply #3 on: February 27, 2012, 06:19:12 pm »
I use Edelay in my mod. It goes in the character file header. Make a copy of your character's text file. Make the copied character a weapon. Put Edelay in the model header. Have the original character can have a freespecial that equips a weapon with weaponframe. They turn into the faster version when you do the freespecial. The part I do not know how to do is make it only last 10 seconds.
To double speed you can do Edelay 1 2.0 1 999 1 999. That will multiply all delays by 2.0.

mmm there is no way to simply set a time limit for the Edelay command and put it directly in the char.txt? i've never used it before, so i don't really know what it exactly does.  :nervous:
My current project:

Knights & Dragons: The Endless Quest - COMPLETE!

Offline becker

  • Full Member
  • ***
  • Posts: 105
Re: Speed up freespecial request
« Reply #4 on: February 27, 2012, 07:08:40 pm »
Edelay is modifying every animation by the same amount. It can be addition or multiplication of existing delay times. The first number of edelay is addition/multiplication. Getting the effect to last 10 seconds is a separate issue. Since the edelay character is a weapon, somehow you need the weapon to be dropped.

Offline Pierwolf

  • Sr. Member
  • ****
  • Posts: 348
    • Pierwolf's Magic chamber of abstract theories about relativity of Karma and metempsychosis
Re: Speed up freespecial request
« Reply #5 on: February 28, 2012, 04:44:16 pm »
Edelay is modifying every animation by the same amount. It can be addition or multiplication of existing delay times. The first number of edelay is addition/multiplication. Getting the effect to last 10 seconds is a separate issue. Since the edelay character is a weapon, somehow you need the weapon to be dropped.


mmm... so i can't make the effect fade after some time...
then maybe i can add shootnum to make so that after a couple of hits, the char return to the normal state... or maybe weaploss , so that the char return to the normal state after being hit... wich of this two is the most cheaper in your opinion?
My current project:

Knights & Dragons: The Endless Quest - COMPLETE!

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Speed up freespecial request
« Reply #6 on: February 28, 2012, 09:06:08 pm »
 IMO it's best to use script based edelay. No need to trouble yourself with weapon models.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline MatMan

  • Hero Member
  • *****
  • Posts: 1320
Re: Speed up freespecial request
« Reply #7 on: February 29, 2012, 09:06:56 am »
I know about the header part but I'll take a look at beckers explanation (thanx) some time and try getting it working via script.

Once that's done then all you'll need to do is add a timer (using a index variable) and you could get it todo what you want (Pierwolf), even to the point that it incrementally fades away the closer it gets to the end of total time but like mentioned before it will effect all moves but with a bit of work it can be done to only work within a specific animation but its not gonna be that easy todo.

Also, when you say speed up, do you mean characters movement speed or animations delay speed?

Offline Pierwolf

  • Sr. Member
  • ****
  • Posts: 348
    • Pierwolf's Magic chamber of abstract theories about relativity of Karma and metempsychosis
Re: Speed up freespecial request
« Reply #8 on: February 29, 2012, 12:35:32 pm »
IMO it's best to use script based edelay. No need to trouble yourself with weapon models.

actually i've made it with a weapon model and it works. the only problem i could i could find is that this way require more memory, since is like a new character, so if you know a script that may be appropriate for my case, you're welcome!

I know about the header part but I'll take a look at beckers explanation (thanx) some time and try getting it working via script.

Once that's done then all you'll need to do is add a timer (using a index variable) and you could get it todo what you want (Pierwolf), even to the point that it incrementally fades away the closer it gets to the end of total time but like mentioned before it will effect all moves but with a bit of work it can be done to only work within a specific animation but its not gonna be that easy todo.

Also, when you say speed up, do you mean characters movement speed or animations delay speed?

 MatMan, i mean speed AND animations delay speed as well.
My current project:

Knights & Dragons: The Endless Quest - COMPLETE!

Offline MatMan

  • Hero Member
  • *****
  • Posts: 1320
Re: Speed up freespecial request
« Reply #9 on: March 01, 2012, 05:59:49 pm »
Quote
...require more memory......
The only amount of memory increase is the amount needed to the txt file, so it should be a really tiny footprint.

Quote
i mean speed AND animations delay speed as well.
How about this, just duplicate the animation and call it follow1 or something and then add a condition on the first frame of that freespecial to check if you want it to use the speed up and if it does then call the follow anim,

something like....
anim freespecial 1
  delay 3 #Delay 3 is the minimum amount delay for a script to successfully run
  @script
  void self = getlocalvar("self");
  int usespeedup = getindexedvar(1);//The indexed variable that detects if it should be in speed up
  if ( usespeedup == 1) //If not the it will carry on playing the normal speed one
 {
    performattack(self, openborconstant("ANI_Follow1"), 1);
  }

@endscript
  frame data/1.gif
  delay 7
  .......

Edit...
Obviously you'll need some sort of condition to activate it and using the script.c file (or something similar) a timer that will deactivate it.
« Last Edit: March 02, 2012, 08:50:30 am by MatMan »

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal