collapse

Author Topic: help with coding  (Read 472 times)

0 Members and 2 Guests are viewing this topic.

Offline aznpride87

  • Initiate
  • **
  • Posts: 41
  • Last Login:September 30, 2009, 04:43:16 PM
    • Email
help with coding
« on: February 03, 2009, 05:39:15 AM »
what code do i need to input so that the special bar with automatically regenerate itself

i want some of my characters (mainly dbz ones) have the special bar automatically regenerate.



Offline ZVitor

  • IMT Content Architect
  • *
  • Posts: 2683
  • Last Login:October 25, 2024, 07:34:33 PM
    • Email
Re: help with coding
« Reply #1 on: February 03, 2009, 08:08:59 AM »
add this to [Statedef -3]:

[State 0, PowerAdd]
type = PowerAdd
trigger1 =  roundstate = 2
trigger1 = palno != 2
trigger1 =  (stateno <1000) || (stateno >3300)
value = 1


(Code from quasar by bdcirck)

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: help with coding
« Reply #2 on: February 03, 2009, 09:45:49 AM »
the code wont activate if you use the second pallete......and if you are in a state between 1001 and 3299.

Depending on what you want you can use differents triggers..like animelem =1 (so it will increase at the beggining of each statedef)......or time > 0.....as long as the time in the statedef is > 0 it will increase.....or if you want an automatic refill use as a trigger = 1 ... 1 means true (in some books of c++ coding, it says that it measn as long as 1 ist equal to 1..these means forever)


sig made by shullbocka

Offline bdcirck

  • Initiate
  • **
  • Posts: 154
  • Last Login:March 23, 2013, 11:48:21 AM
    • Email
Re: help with coding
« Reply #3 on: February 03, 2009, 10:56:44 AM »
I would keep the trigger1 =  roundstate = 2 in there if I where you because else it will regenerate power during intro's endings and every other state that exists.

Offline El Chupacabras

  • Forum Member
  • ***
  • Posts: 315
  • Last Login:June 11, 2010, 04:34:36 PM
Re: help with coding
« Reply #4 on: February 03, 2009, 01:58:34 PM »
So just make it this -

[State 0, PowerAdd]
type = PowerAdd
triggerall =  roundstate = 2
trigger1 = 1
value = x  <-------- Use whatever value you see fit

Offline aznpride87

  • Initiate
  • **
  • Posts: 41
  • Last Login:September 30, 2009, 04:43:16 PM
    • Email
Re: help with coding
« Reply #5 on: February 03, 2009, 07:55:32 PM »
i have a couple of questions concerning this topic

1) what does the value mean

2) how can i make it regenerate faster

3) how can i make it regenerate smoother
« Last Edit: February 03, 2009, 08:10:46 PM by aznpride87 »

Offline El Chupacabras

  • Forum Member
  • ***
  • Posts: 315
  • Last Login:June 11, 2010, 04:34:36 PM
Re: help with coding
« Reply #6 on: February 03, 2009, 10:07:15 PM »
...
1) what does the value mean
...

LifeAdd

...
2) how can i make it regenerate faster
...

See 1.

...
3) how can i make it regenerate smoother

... don't understand.

Offline bdcirck

  • Initiate
  • **
  • Posts: 154
  • Last Login:March 23, 2013, 11:48:21 AM
    • Email
Re: help with coding
« Reply #7 on: February 04, 2009, 02:20:13 AM »
I would check the tutorial files of your mugen, these can be found in the doc directory of you mugen. There is a tutorial in it that explains everything. In the case the value stands for the amount that will be added.

add this to [Statedef -3]:

[State 0, PowerAdd]
type = PowerAdd
triggerall =  roundstate = 2
trigger1 = 1
value = x

You need to replace x with a number. If you do this you will gain x power per tick (a second has 60 ticks). So for example 1:

[State 0, PowerAdd]
type = PowerAdd
triggerall =  roundstate = 2
trigger1 = 1
value = 1

in this example you will gain 1 power every tick witch is 60 power per second

So for example 2:

[State 0, PowerAdd]
type = PowerAdd
triggerall =  roundstate = 2
trigger1 = 1
value = 60

in this example you will gain 60 power every tick witch is 3600 power per second.

Offline aznpride87

  • Initiate
  • **
  • Posts: 41
  • Last Login:September 30, 2009, 04:43:16 PM
    • Email
Re: help with coding
« Reply #8 on: February 04, 2009, 09:45:21 AM »
thank you... that helped a lot

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

D2TD VS Showcase Thread by D2TD
[November 24, 2024, 09:12:03 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by LightFlare
[November 21, 2024, 09:44:09 PM]


Terrordrome: Rise of the Boogeymen Extended Version ( jeepers creepers) version by leonardo
[November 19, 2024, 10:22:47 PM]


Hill of the Nameless(1.1 Only) by Vegaz by LightFlare
[November 19, 2024, 10:50:39 AM]


Golden Axe Returns by gokudo99
[November 19, 2024, 03:59:31 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]

* IMT Calendar

November 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