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

There aren't any users online.



Author Topic: Applying Scripts  (Read 20090 times)

0 Members and 1 Guest are viewing this topic.

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Applying Scripts
« Reply #105 on: September 29, 2007, 02:37:49 pm »
 Thanks Hide!

  :hmm: The reason I haven't explain about any slam in my demo yet is because it's complicated. It's compilation of various features (scripts and features) to get certain goals.

 I would have to explain it part per part  :time_check:. AND I'll post it in proper thread instead of this.

 However here's some explanation about some features:
1. attackone
 This feature enable attackboxes in grabattack animation to hit other opponent aside from grabbed one. In Brian's case, this allows him to hurt obstacles or other players while he is performing DDT.
 In case you don't know, I set Brian to be able to hit obstacles as well

2. Spawnframe and custentity
 If you read the manual, you should have get it. Anyway this 2 simply spawn an entity when a frame is reached. Spawnframe determines the condition and frame while custentity determines what entity would be spawned. If you want to know more, read the manual.
 Do you see the quake effect when DDT slams hero to ground? I made that effect with these 2 features.

 The other will be explained later.

 Oh yes, you are correct about fall3, it's the DDT-ed animation.
 @cmd calls function from script.c inside scripts folder. That's the exact explanation.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

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

Offline HideRaisen

  • Full Member
  • ***
  • Posts: 223
  • Be fair to others as you are to yourself.
Re: Applying Scripts
« Reply #106 on: September 29, 2007, 10:12:27 pm »
Sound great Bloodbane, take as long as need to. I will look into the manual some more and I will look for any update you have on it when you do. Thankyou for taking your time to write back.
*Current MOD*
- In progress - The Last Blade Hell's Gate
(34% Complete)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Applying Scripts
« Reply #107 on: October 02, 2007, 01:19:04 pm »
 Argh! I was going to post it today but I was busy :(. OK, I'll work on it tomorrow. Oh yes, I'll post in Script demo thread not here.

 One last thing, I forgot to tell you that although slams consists of many features, not all features are necessary. For instance, attackone and spawnframe can be omitted yet the DDT will still be played.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

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

Offline HideRaisen

  • Full Member
  • ***
  • Posts: 223
  • Be fair to others as you are to yourself.
Re: Applying Scripts
« Reply #108 on: October 12, 2007, 01:31:36 am »
So when can you do it? but anyway take ur time. ;)
*Current MOD*
- In progress - The Last Blade Hell's Gate
(34% Complete)

Offline Orochi_X

  • Hero Member
  • *****
  • Posts: 3301
  • Now! Count up your crimes.
Re: Applying Scripts
« Reply #109 on: October 22, 2007, 12:54:51 pm »
I'm posting up my (almost) complete 4 button/combo script. I might aswell explain it as I'm getting closer to releasing a demo....It's actually insanely easy.

Code: [Select]
if (vName == "Ryo"){ //Playing as Ryo?
       
       if ((iAniID == 7 && iAniPos >= 2) || (iAniID == 81 && iAniPos >= 1) || (iAniID == 8 && iAniPos >= 3) || (iAniID == 82 && iAniPos >= 6) || (iAniID == 9 && iAniPos >= 6) || (iAniID == 83 && iAniPos >= 6) || (iAniID == 84 && iAniPos >= 8) || (iAniID == 112 && iAniPos >= 4) || (iAniID == 113 && iAniPos >= 2) || (iAniID == 114 && iAniPos >= 2) || (iAniID == 115 && iAniPos >= 5) || (iAniID == 116 && iAniPos >= 7) || iAniID == 107){ //Penultimate frames of attack 1 ,2 ,3 ,4 and thier variations and jumpland?

          if (iAttack){ //New attack key press?

             changeentityproperty(vSelf, "animation", openborconstant("ANI_ATTACK1")); //Switch to attack 1
                   
          }else if (iAttack2){ //New attack2 key press?

             changeentityproperty(vSelf, "animation", openborconstant("ANI_ATTACK2")); //Switch to attack 2

}else if (iAttack3){ //New attack3 key press?

             changeentityproperty(vSelf, "animation", openborconstant("ANI_ATTACK3")); //Switch to attack 3

}else if (iAttack4){ //New attack4 key press?

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW4")); //Switch to attack 4

}

I used DC's template , so I wont need to explain too much as it is already well documented.

The first line checks the name of the character. All my characters have different frame properties so I will need to define different anim positions for each.

That large chunk underneath is the main part. It is checking whether Ryo is in the penultimate or final frame of his attacks 1 -4 and their variants ( which are crouching and close attacks) and anim jumpland too , so that I may combo out of a jump attack.

The final frame of each of those animations is actually a dummy to allow the player slightly more time to press a button. I've chosen to use the last frame of anim idle so that it will seam flawlessly with the real anim idle if a button is missed.

After that , the script checks to see which button I press and changes animation accordingly.

Here is one of my attacks. They are all pretty similar , except for attack4 , which I will explain shortly.

Code: [Select]
anim attack1
loop 0
delay          5
offset 32 99
                     bbox           14 4 41 95
@cmd    ani001 "ANI_FOLLOW6" 0 4 0 0 0 0 0 0 0 0
@cmd    ani001 "ANI_FOLLOW1" 0 0 0 0 -50 50 -10 10 0 0
frame data/chars/Ryo/lp01.gif
delay 7
offset 32 98
attack 39 14 46 34 5 0 0 0 8
frame data/chars/Ryo/lp02.gif
                     attack          0 0 0 0 0 0 0 0 0
delay 8
offset 32 99
                     bbox           14 4 41 95
frame data/chars/Ryo/lp01.gif
                     loop             0
delay 15
offset 33 100
bbox 12 0 35 102
frame data/chars/Ryo/idle01.gif

DC has already done a fine job of explaining his script library so I'll keep it brief.

The first @cmd checks to see if the player is holding down whilst the second chacks to see if the enemy is in close range. In both cases , the animation will change to a different attack. One thing to note is that the first one overides the second.

Now for attack4. When you perform a scripted combo , after the last attack , the engine will take control again and perform the last attack stated in atchain (kinda annoying). I solved this by setting atchain to atchain 1 4 and giving attack4 just the last frame of anim idle. Meaning I have no visual discrepencies and I can use that small amount of time to initiate the combo again.

While I'm here , I would like to share my 4 button jumpattacks. Again very easy and work without errors for jump , jumpforward and runjump (havent implemented those yet)

Code: [Select]
}else if (iAniID == 2){// jump anim

           if (iAttack2){//pressed attack 2

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW10")); //Switch to attack 2
                 
       }else if (iAttack3){//pressed attack 3

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW11")); //Switch to attack 4
                 
       }else if (iAttack4){//pressed attack 4

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW12")); //Switch to attack 4
                 
       }

       }else if (iAniID == 105){//jumpforward anim

           if (iAttack2){//pressed attack 2

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW13")); //Switch to attack 2
                 
       }else if (iAttack3){//pressed attack 3

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW14")); //Switch to attack 4
                 
       }else if (iAttack4){//pressed attack 4

             changeentityproperty(vSelf, "animation", openborconstant("ANI_FOLLOW15")); //Switch to attack 4

   }

The (brief) notation within the script should be enough explaination....

« Last Edit: October 22, 2007, 06:46:55 pm by Orochi_X »


* Orochi_X says : " Sore ga doushita? " :looney:

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Applying Scripts
« Reply #110 on: October 22, 2007, 01:53:16 pm »
 Nice trick Orochi! I can see your point! But you have to declare the variables you are using first, especially the 'key status' variables.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

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

Offline bWWd

  • Hero Member
  • *****
  • Posts: 1870
Re: Applying Scripts
« Reply #111 on: January 19, 2008, 08:19:46 pm »
Now lib001 doesnt work with new versions , i deleted some comments in it , it helped but its still not enough and it crashing engine.
Last version where it partialy works is this version:
OpenBoR_Win1284.rar
« Last Edit: January 19, 2008, 09:29:14 pm by bWWd »

Offline kbandressen

  • Developer
  • Hero Member
  • *****
  • Posts: 1347
Re: Applying Scripts
« Reply #112 on: January 20, 2008, 04:12:03 am »
You'll have to talk to Damon about getting it updated; the script engine has just been through a lot of optimizations and is more strict about some things now.  I had to rework quite a few of my scripts as well, but it was well worth it to have the FPS boost that the reworked script engine has brought us!

Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Re: Applying Scripts
« Reply #113 on: January 20, 2008, 08:54:00 am »
My answer is going to be "soon". Because it is so far behind, I'm not supporting anything out of the script demo directly. Instead I am rewriting everything over from scratch. As soon as I have some viable material I'll be happy to release it for use.

DC
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline bigmenace

  • Sr. Member
  • ****
  • Posts: 320
Re: Applying Scripts
« Reply #114 on: October 09, 2008, 06:18:35 pm »
Say Damon you think you can reupload those script libraries? Its saying timed out under first post, and the direct downloads to your page says 404 not found.  I had them at one point but lost alot of stuff from my old pc.

Offline tushantin

  • Jr. Member
  • **
  • Posts: 21
  • You game?
    • My Gallery
Re: Applying Scripts
« Reply #115 on: January 02, 2009, 06:25:03 am »
 :teary_eyed: Oh man, attachments timed out....

Offline bkdog411

  • Jr. Member
  • **
  • Posts: 6
Re: Applying Scripts
« Reply #116 on: March 11, 2009, 11:18:08 pm »
found it Thanks this is incredible  :cheers!:
« Last Edit: April 23, 2009, 03:11:33 am by bkdog411 »

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal