collapse

Author Topic: help with coding  (Read 453 times)

0 Members and 1 Guest 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:January 01, 2024, 07:22:36 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

Street Fighter 1 Ultimate Ryu by ELECTRO
[May 22, 2024, 03:58:25 PM]


China Town (Revenge of Shinobi) by Lord_Enemil
[May 22, 2024, 03:02:10 PM]


Neon Light Force Demo by Uche_of_IMT
[May 22, 2024, 10:21:37 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[May 21, 2024, 11:50:20 PM]


The Spider release + Spider-Man game by kobun
[May 21, 2024, 02:05:24 AM]


Let's all try it together! Yazawanainn gose breakdancing in MUGEN! by GTFoxN6Y
[May 18, 2024, 05:00:14 PM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[May 18, 2024, 11:17:34 AM]


Classic VS : Athena by ELECTRO
[May 15, 2024, 01:25:51 PM]


D2TD VS Showcase Thread by D2TD
[May 12, 2024, 10:20:11 AM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]

* IMT Calendar

May 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 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal