YesNoOk
avatar

flying attack codes and homing projectile with detonator  (Read 939 times)

Started by sgn15, July 28, 2010, 06:37:29 am
Share this topic:
flying attack codes and homing projectile with detonator
New #1  July 28, 2010, 06:37:29 am
  • ***
i used this flying codes that i got from searching in google and the flying code works

Spoiler, click to toggle visibilty

anyone here can give me codes for attacking while flying that is compatible to the flying codes i used (above)?


2. i want to make my char throw something to the opponent that will stay in the air and follow the enemy around (while staying flying in the air) then my char can detonate those as bombs by using another button.

i used this tutorial for homing projectiles (coded as helper)

Spoiler, click to toggle visibilty

credits to FlowaGirl for the tutorial..
Last Edit: August 09, 2010, 11:40:06 am by sgn15
Re: flying attack codes?
#2  July 28, 2010, 07:30:37 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Most of the time flight is a hack of the standing state, so if you enter state 0 and you're above ground level you return back to flight.

Most of the time you just swap the requirement of ctrl for stateno = 1900, or add a trigger2 = stateno = 1900 for standing states. If you don't wanna use standing states, just set up more changestates with the above trigger instead of ctrl and statetype.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes?
#3  July 28, 2010, 08:51:02 am
  • ***
im sorry i didnt got what you said quite clear... so if i want to use the standing attacks i have so far, i dont have to make new states in animations and new statedefs in cns? is that what you mean by "swapping ctrl requirement for state no = 1900 or ......." ?

and about the second option you mentioned (not using standing states), can you give me a very simple sample code (no need for the hitdef)... i think i prefer this option better... i want to add new statedefs (my flying attacks have different animations from standing attacks)

this is my first time coding a flying char.. and this is my third char overall... so i guess im still a noob in coding.. further help would be much appreciated. thanks   :)
Re: flying attack codes?
#4  July 28, 2010, 09:42:25 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Make an attack.

Make it possible to do that attack from state 1900.

That is all.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes?
#5  July 28, 2010, 02:28:10 pm
  • ***
Spoiler, click to toggle visibilty

not working. what do i need to change or add to my codes?
Re: flying attack codes?
#6  July 28, 2010, 10:34:18 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You don't have ctrl in state 1900. Remove it as a trigger in your cmd.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#7  July 29, 2010, 04:34:41 am
  • ***
thanks... i got it to work! thanks a lot!

btw i edited the title of the thread so i wont be making another thread to help ease the job of moderators a bit by one thread less

i edited the first post too..

for the homing projectile with detonator problem:

my states:
230 - char releasing/throwing the helper (default standing light kick)
501 - helper (follows the enemy around, can be detonated)
250 - char detonating the helper (default standing strong kick)
251 - explosion effects animation (didnt add a statedef of this because i also dont know how to code this)

Spoiler, click to toggle visibilty

right now this code.. the helper follows the enemy for some time (time = 120 in the destroyself code)... how do i code the detonator and also the explosion effects animations?
Re: flying attack codes and homing projectile with detonator
#8  July 29, 2010, 05:50:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
In your helper alter this

Quote
[State 501, 4]
type = Destroyself
trigger1 = command = "c"

[State 501, ChangeState]
type = ChangeState
trigger1 = command = "c"
value = 250
ctrl = 1
Destroyself needs a new trigger. You mentioned time = 120, use that. Changestate, alter it to read

trigger1 = parent, stateno = 250
value = 251

then create a state where the helper blows up. Just use a destroyself here. This state is EXACTLY the same as a normal attack, no different in any way.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#9  July 29, 2010, 07:55:59 am
  • ***
Spoiler, click to toggle visibilty

it worked but the explosion effects dont dissapear after i detonate the helper.. and do i add red collision boxes to animation states 501 and 251? how do i make the enemy fall or the enemy's body fly up after i detonate the helper (helper explodes)?
Re: flying attack codes and homing projectile with detonator
#10  July 29, 2010, 08:09:56 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Why does the detonation have a command requirement as well?

I told you, the detonation is an ATTACK. Code it as if it is one.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#11  July 29, 2010, 08:28:32 am
  • ***
thanks i added red collision boxes to animation 251 and added hitdef to statedef of 251 and it works now...

is it possible for the button c to not do the animation for state 250 if i have not thrown any helpers at the enemy? if possible, how?

and how can i limit the helpers i can throw before i detonate them?
for example: i can only throw 5 helpers at maximum before detonating them (5 max) all at the same time?
Last Edit: July 29, 2010, 08:38:00 am by sgn15
Re: flying attack codes and homing projectile with detonator
#12  July 29, 2010, 08:44:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Your helper should have an ID. State 250 needs the requirement

trigger1 = numhelper(ID you specified for the helper) >= 1

Your release a helper state should also make use of that trigger

triggerall = numhelper(ID you're going to specify for the helper) < 5


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#13  July 29, 2010, 03:27:42 pm
  • ***
codes included in the problem
Spoiler, click to toggle visibilty

not working... i tried changing all "ID" with 50 but also didnt worked...

btw, if i want to make another helper (new and different sprites and state) that i want to code the same way as this first helper (homing projectile and with detonator) can i still use the old detonator state (state 250) i used for first helper? or i need a new detonator state?
Re: flying attack codes and homing projectile with detonator
#14  July 29, 2010, 10:44:30 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I did give you the format

trigger1 = numhelper(50) = 0

etc. These should both be in the cmd.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#15  July 30, 2010, 05:55:02 am
  • ***
oh i thought the "numhelper" was supposed to be replaced with an integer value (i misunderstood the parentheses) my bad
ok thanks i got it to work now... how about this?   :)

btw, if i want to make another helper (new and different sprites and state) that i want to code the same way as this first helper (homing projectile and with detonator) can i still use the old detonator state (state 250) i used for first helper? or i need a new detonator state?
Last Edit: July 30, 2010, 06:38:10 am by sgn15
Re: flying attack codes and homing projectile with detonator
#16  July 30, 2010, 08:13:25 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You know the theory now. Go try it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator
#17  July 30, 2010, 02:46:08 pm
  • ***
I tried it and it doesnt work? am i right? i tried it using this way (the new helper is state 505, same homing projectile and detonating style) the releasing of the new helper is state 210

Spoiler, click to toggle visibilty

i want my char when i release the 1st helper (with limit of 10 ), i can still release the 2nd helper (with limit of 10 too) then i can detonate them both (2 different helpers) at the same time using the same detonator (state 250)

is it possible to code? or i need both a new detonator and a new explosion effects (for the new helper) ?

EDIT:
i used trigger2 for the second helper instead of trigger1 and it works now..

i want to change the icon but i dont see a solve/unsolve button at the bottom of this thread while i am logged in). should I or you lock this thread if my problems are solved already?

and i want to thank you, Cyanide, for helping me with my coding problems.  thanks a lot.   ;D
Last Edit: July 30, 2010, 03:02:36 pm by sgn15
Re: flying attack codes and homing projectile with detonator *SOLVED*
#18  August 08, 2010, 03:52:17 am
  • ***
sorry to bump this but i found a bug in my char and its the same concern as this topic:

i made these style (throwing helper that follows the enemy, then i can detonate the helpers) also for flying mode. but one helper is not working. it works when i used it first before using the 2nd and the 3rd helpers. but it doesnt work if i throw the 2nd and the 3rd helpers first before throwing the 1st helper. it works for the standing mode

states (all in flying mode):
2000 detonator:
2001: 2nd helper (working)
2003: 3rd helper (working)
2004: 1st helper (not working if not thrown first before the the 2001 and 2002 helpers)
2100: explosion effect for both 2001 and 2003
2200: explosion effect for 2004

codes:
Spoiler, click to toggle visibilty
Re: flying attack codes and homing projectile with detonator *SOLVED*
#19  August 08, 2010, 04:05:27 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
trigger1 = command = "c"
Change to

trigger1 = parent, command = "c"

This is the same solution as earlier in the topic...


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator *SOLVED*
#20  August 08, 2010, 04:54:04 am
  • ***
it doesnt work. i tried changing  into trigger1 = parent, command = "c" for the helper with the problem. then i tried changing that line of code in the other 2 working helpers's statedefs as well. its still the same problem.

codes of the other 2 helpers (working)
Spoiler, click to toggle visibilty

i think i did the same thing for these 2 attacks. why is it the 1st helper is the only one with the problem.
Last Edit: August 08, 2010, 07:45:04 am by sgn15
Re: flying attack codes and homing projectile with detonator *SOLVED*
#21  August 08, 2010, 06:09:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Your biggest difference is the detonation state. Is the detonation for the first helper ACTUALLY 2200, and does it exist.

Also, parent, command = "c" will actually break that, because C also sends parent to 2000, but the destroyself will happen first. I should have noticed it before but remove that line altogether.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: flying attack codes and homing projectile with detonator *SOLVED*
New #22  August 08, 2010, 11:38:25 am
  • ***
for first helper detonation is 2200, i checked it and its there exists in the animations part.

i tried deleting the line trigger1 = parent, command = "c in state of first helper but it still doesnt work.

sorry i forgot to explain this much clearer
as of my previous post, these are the situations and these havent changed after i deleted the line mentioned above:
1. used first helper then used second (state 2003) = working fine
2. used first helper then used second (state 2003) = working fine
3. used second helper (state 2003, multiple helpers inside this attack) then used 1st helper = working fine
4. used third helper (state 2001, single helper inside this attack) then used 1st helper = not working (the first helper cant be thrown)
Last Edit: August 10, 2010, 06:21:20 am by sgn15