blackchaos Administrator
Number of posts : 137 Age : 41 Location : London,England Registration date : 2008-07-23
| Subject: Helper Coding July 27th 2008, 4:45 pm | |
| always wanted to know how to code a helper. well look no further.
[statedef 3000] type = S physics = S movetype = A anim = 1000 ;animation of the move itself ctrl = 0
[State 3000, Helper] ;state number is an example type = Helper trigger1 = animelemtime(3) >= 6 ;any trigger you wish, mine activates when frame 3 is more or equal to 6 gameticks passed. helpertype = normal ; or player name = "hadouken super" ;give it a name, required. ID = 3000 ;give the helper its own ID for use in AI or stating which helper ID you need stateno = 3001 ;has to differ from the current state, this will be the helpers state. pos = -15,-34 ;whateverposition you require. this was random. postype = p1 ;p2,front,back,left,right facing = 1 keyctrl = 0 ownpal = 0 supermovetime = 99999 pausemovetime = 99999 ;remove pausemovetime, if activating when using superpause
[state 3000] ;ends the current state.......required type = changestate trigger1 = !animtime value = 0 ctrl = 1
now what is required to code it in the state it appears in which is stateno = 3001
[statedef 3001] type = A ;type is A because its a fireball and its not on the ground. physics = N ;physics is neutral to stop it falling to ground level movetype = A ;attack anim = 3001 ;animation of the projectile velset = 5,0 sets X velocity to 5 moving it fast across the screen toward p2 ctrl = 0
[state 3001] type = nothitby trigger = 1 ;1 means it happens all the time value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT time = 999 ;give it enough time
adding a nothitby to your helper means your helper cant be hit and turned into your character causing a glitch.
NOW ADD A HITDEF TRIGGERING TIME > 0 OR WHATEVER YOU REQUIRE You can add the hitspark as the fireball spark if the spark in your animations is anim 3002 for example add, sparkno = S3002
after the hitdef add a destroyself
[state 3001] type = destroyself trigger1 = ;the trigger is up to you, you can destroy the hadouken after 1 hit so use movecontact or after more, thats why you use time > 0 in the hitdef so you can have infinate hits, so to destroy it after 10 hits use hitcount = 10 as the trigger.
make sure you have a red collision box on all the fireball frames.
hope this helps. code by Me. | |
|
fer619 Member
Number of posts : 72 Age : 43 Location : Guadalajara, Mexico Registration date : 2008-07-14
| Subject: Re: Helper Coding July 28th 2008, 9:20 pm | |
| hey, thanks for the code . this might be helpful to me. | |
|
JozoTheBoogey MO Founder
Number of posts : 396 Age : 33 Location : Bosnia & Herzegowina Registration date : 2008-07-08
| Subject: Re: Helper Coding September 7th 2008, 6:37 pm | |
| I think I made a mistake with the coding I used the attack and all the characters apeared above me... it always happens when I try to code it... | |
|
Sponsored content
| Subject: Re: Helper Coding | |
| |
|