collapse

Author Topic: Life Bar Effects Help  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Life Bar Effects Help
« on: April 08, 2010, 06:23:30 PM »
Can anyone help me make this?



I am not sure how to start it and how to link it to life being drained?


"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Life Bar Effects Help
« Reply #1 on: April 09, 2010, 12:30:26 AM »
That can only be accomplished, with some codes on the characters, using some helpers.

It is only practical, if you are making a full game


sig made by shullbocka

Offline AxKeeper

  • Contributor
  • ****
  • Posts: 165
  • Last Login:February 16, 2016, 08:44:04 PM
  • What? You want credit? Debit or Mastercard? :P
    • Mugen Multiverse
Re: Life Bar Effects Help
« Reply #2 on: April 11, 2010, 12:03:27 AM »
I am making a full game but I do not understand how to code complicated stuff using math so I really would appreciate it if someone could lend me a hand and implement this feature in my character, from which I'll create more.

I have been gathering info from mugen forums and I can't get it to function.

Quote
===============
Damage Display
===============
Author: FlowaGirl
flowergirl@cutey.com
http://blargh.piiym-net.com

---------------------------------------------------------------------------
This was inspired by Ragnarok Online. When you attack the opponent, the
amount of damage done is displayed as numbers as part of the hitspark. It
is also done in many other RPG games, such as the Final Fantasy series.
---------------------------------------------------------------------------

In all of your character's attack states, add these 2 pieces in. If the
attack is a projectile, a throw, or does multiple hits, you will need to
change the trigger accordingly.

[State ****: VarSet]
type = VarSet
trigger1 = (MoveHit)
var(0) = (EnemyNear, GetHitVar(Damage))
persistent = 0
ignorehitpause = 1

[State ****: Helper]
type = Helper
trigger1 = (MoveHit)
helpertype = Normal
name = "DamageDisplay"
id = ****
pos = 0,0
postype = p1
facing = 1
stateno = ****
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
ignorehitpause = 1

Now you create the Helper's state, where the effect is created. Please note,
that Helpers use their own set of variables, so you don't need to change
any variables here.

[Statedef ****]
type = A
movetype = I
physics = N
anim = **** ;Invisible anim
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 0
facep2 = 0
hitdefpersist = 0
movehitpersist = 0
hitcountpersist = 0
sprpriority = 2

This is the equation to set the current value. Maximum value is 9999.

[State ****: VarSet]
type = VarSet
trigger1 = (!Time)
var(1) = (Parent, Var(1))

[State ****: VarSet]
type = VarSet
trigger1 = 1
var(2) = floor(var(1)/1000)

[State ****: VarSet]
type = VarSet
trigger1 = 1
var(3) = floor(var(1)/100 - var(2) * 10)

[State ****: VarSet]
type = VarSet
trigger1 = 1
var(4) = floor(var(1)/10 - var(2) * 100 - var(3) * 10)

[State ****: VarSet]
type = VarSet
trigger1 = 1
var(5) = floor(var(1)/1 - var(2) * 1000 - var(3) * 100 - var(4) * 10)

You should adjust the Explod X positions here. In this example, the Explods
are spaced out by every 4 pixels. The Y position of all Explods should be
the same.

Also, animations should be organized in sequence, for example:

9000: 0
9001: 1
9002: 2
9003: 3
9004: 4
9005: 5
9006: 6
9007: 7
9008: 8
9009: 9

[State ****: Explod]
type = Explod
trigger1 = (!Time) && (Var(1) >= 1000)
anim = 9000 + var(2)
id = ****
pos = 0,-30
postype = p2
facing = IfElse((Parent, Facing = EnemyNear, Facing),Facing,(Facing * -1))
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
random = 0,0
removetime = -1
supermove = 0
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0
ignorehitpause = 1

[State ****: Explod]
type = Explod
trigger1 = (!Time) && (Var(1) >= 100)
anim = **** + var(3)
id = ****
pos = IfElse((Parent, Facing = EnemyNear, Facing),(Facing * 4),(Facing * -4)),-30
postype = p2
facing = IfElse((Parent, Facing = EnemyNear, Facing),Facing,(Facing * -1))
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
random = 0,0
removetime = -1
supermove = 0
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0
ignorehitpause = 1

[State ****: Explod]
type = Explod
trigger1 = (!Time) && (Var(1) >= 10)
anim = **** + var(4)
id = ****
pos = IfElse((Parent, Facing = EnemyNear, Facing),(Facing * Cool,(Facing * -8)),-30
postype = p2
facing = IfElse((Parent, Facing = EnemyNear, Facing),Facing,(Facing * -1))
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
random = 0,0
removetime = -1
supermove = 0
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0
ignorehitpause = 1

[State ****: Explod]
type = Explod
trigger1 = (!Time) && (Var(1) >= 1)
anim = **** + var(5)
id = ****
pos = IfElse((Parent, Facing = EnemyNear, Facing),(Facing * 12),(Facing * -12)),-30
postype = p2
facing = IfElse((Parent, Facing = EnemyNear, Facing),Facing,(Facing * -1))
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
random = 0,0
removetime = -1
supermove = 0
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0
ignorehitpause = 1

This is used to destroy the Helper, after a certain period of time.

[State ****: DestroySelf]
type = DestroySelf
trigger1 = (Time > 40) && (NumExplod(****) = 0)




























==========================
Graphical Meter: Bar type
==========================
Author: FlowaGirl
flowergirl@cutey.com
http://blargh.piiym-net.com

---------------------------------------------------------------------------
In many games, any special effects that the character
currently has, is displayed by either graphical bars, or
numerical values.

You can implement this code into another feature,
such as Ragnarok's Stun meter, or in a Timer, which
can be easily done.

This tutorial shows how a graphical bar is done.
---------------------------------------------------------------------------

In your -2/-3 states, insert this code.

Var(0) is the meter variable. If, for example, you want to implement
this into Ragnarok's Stun meter, then that variable should be used.

You must adjust the "pos" values accordingly, where:

a. TeamSide = 1; Leave unchanged
b. 1; This is the X position of the Explod if the character is on the P1 side. (Against the left wall.)
c. 319; This is the position of the Explod if the character is on the P2 side. (Against the right wall.)
d. 65; This is the Y position of both sides.

Removetime should usually be set to 1, but if your meter has flashy graphics to it, then this value should be the
same as the number of ticks in the animation used in the AIR file.

**** is the animation to be used for the bar, which will be explained later.

[State -2: Explod]
type = Explod
trigger1 = (Var(0) > 0) && (NumExplod(9000) = 0)
anim = ****+Var(0)
id = 9000
pos = IfElse(TeamSide = 1,1,319),65
postype = left
bindtime = -1
removetime = 1
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

Now, after inserting this piece in, you can add the animations in the AIR file. The first animation of this
bar should be the same value as ****, while all other anims of the bar after it are done in sequence. Eg.

Anim 9000 in this example is where you put in anim ****.

[Begin Action ****]
9000,0, 0,0, -1,,A

All anims after **** should be organized like this.

[Begin Action 9001]
9001,0, 0,0, -1,,A

[Begin Action 9002]
9002,0, 0,0, -1,,A

[Begin Action 9003]
9003,0, 0,0, -1,,A

[Begin Action 9004]
9004,0, 0,0, -1,,A

[Begin Action 9005]
9005,0, 0,0, -1,,A

Etc...

The other other thing that you need to do now, is to put in your bar animations. You can use the
same concept for numerical values, but only recommended for use if values aren't very high.




















Lets do this simple then. I'm going to make the assumption your "damage" part of the lifebars is 100 pixels long.

So 10 health = 1 pixel.

Now we know that, we can work out how much we need to scale the bar to be 1000 life.

Take an fvar and set it to your life/10
Code (Mugen): [Select]
[state -2]
type = fvar
trigger1 = alive
fv = #
value = life/10
 the helper that is the lifebar can then detect this value by redirecting to parent. parent,fvar(#) for an angledraw controller

You will be able to display the explods simply by knowing that variable as well. The X position of the explod will be the same as the X scale of the lifebar. You can use vel and accel to make it move. If it needs to splash on the ground, you're looking at a helper instead.

Now, as the helper is the lifebar, we can make it do other crap. When your parent is hit, we can shake

Code (Mugen): [Select]
type = offset
trigger1 = parent, gethitvar(hitshakeover) = 0
y = sin*3 (this will need tweaking)
Lastly for that increase decrease effect... Just use afterimage. Give it a 2 tick time gap and turn it on permanently.  The helper is never being hit so you won't lose it or have a need to turn it off.

I've about given up so if anyone here can do me this favor I would be eternally grateful.
"Aren't they already committing a bigger crime by stealing from gaming companies to begin with? Silly goose" :D

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Virtual Bart Science Fair by Lord_Enemil
[June 15, 2024, 08:23:51 PM]


Classic VS : Cheng / Athena by ELECTRO
[June 13, 2024, 03:03:58 PM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[June 10, 2024, 11:25:24 PM]


Street Fighter Spec Ops 2021 by O Ilusionista
[June 08, 2024, 01:36:06 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[June 06, 2024, 07:34:10 PM]


Kirby the Dream Battle by O Ilusionista
[June 06, 2024, 01:04:12 PM]


Neo Geo Pocket by malevka2
[June 05, 2024, 10:53:57 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[June 03, 2024, 03:18:12 PM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[June 03, 2024, 03:13:51 PM]


Mega Man & Bass - Dynamo Man by Sir Rousseau by O Ilusionista
[June 03, 2024, 03:09:50 PM]

* IMT Calendar

June 2024
Sun Mon Tue Wed Thu Fri Sat
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

SimplePortal 2.3.5 © 2008-2012, SimplePortal