collapse

Author Topic: ynvaser's Helper Projectile Tutorial  (Read 836 times)

0 Members and 1 Guest are viewing this topic.

Offline ynvaser

  • New Member
  • *
  • Posts: 8
  • Last Login:March 05, 2009, 01:33:47 PM
  • Your friendly neighbor DeathNote user
    • ynvaser's MUGEN Hideout
    • Email
ynvaser's Helper Projectile Tutorial
« on: August 11, 2008, 08:41:25 PM »
Hi guys!

This is my very first tutorial. It explains a kind of easy thing, a helper used as a projectile.
It has many benefits, since you can create very crazy things, like the projectile follows the enemy, or blows up and creates many frags, etc. In this tutorial, you will learn the simplest (plain projectile with random direction) To understand this, you will need to know the basics, such as summoning helpers, making anims, creating a simple move, and knowing what's what. If you don't know these, either read  Cyanide's Narutorials, or try to figure the basics out from Elecbyte's tutorials, located in your docs folder of MUGEN.

You must add this to your character's projectile launcher state (where it shots):
;...
[State 420, Helper]         ;This summons helper
type = Helper
trigger1 = Time = 11        ;It summons when the state is at the 11th tick. Change as needed.
helpertype = normal         ;Normal, so not player XD
name = "Renzoku Projectile" ;Give it a name, it's a good thing.
ID = 9001                   ;The indentification number of the helper
stateno = 9001              ;The helper's stateno. If you change it in the helper's state, change it here too.
pos = 50, -44               ;The position where the helper appears
postype = p1                ;It defines from where it counts the distance.
facing = 1                  ;If you change facing with your char, the projectile won't go backwards :P
keyctrl = 0                 ;Keep this at 0.
ownpal = 1                  ;This means that the parent's PalFX's won't affect the helper.
;...

Here's my Goku's Renzoku Projectile State (Copy/Pasteable):
;-Renzoku Projectile   ;I like to give them names
;(Used in StateNo 420) ;This is good to keep your helpers organized
[Statedef 9001]        ;Change the value to fit your needs
type = A
movetype = A
physics = N
anim = 9014            ;Change the anim to your projectile's anim. It must contain at least 1 clsn1 box.
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 10            ;Change this to fit your char
facep2 = 0
hitdefpersist = 0
movehitpersist = 0
hitcountpersist = 0
sprpriority = 3       ;Adjust it, if you want the proj to be behind or in front of everyone.

[State 9001, AssertSpecial]  ;This sctrl won't let the helper's shadow cast.
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 9001, PlayerPush] ;This disables the clsn2's pushing effect.
type = PlayerPush
trigger1 = 1
value = 0

[State 9001, NotHitBy]  ;This won't let the projectile get hit.
type = NotHitBy
trigger1 = 1
value = SCA

;Don't change the order of the following 3 sctrl's.
[State 9001, VarRandom] ;This var randomizes the y velocity of the helper.
type = VarRandom
trigger1 = (!Time)
v = 0
range = -2,2

[State 9001, VarRandom] ;This var serves as a speed booster to the x velocity.
type = VarRandom
trigger1 = (!Time)
v = 1
range = 2,0

[State 9001, VelSet] ;This sctrl sets the velocity of the helper.
type = VelSet
trigger1 = (!Time)
x = 15+(Var(1))      ;As you see, the base velocity is 15, but with the +var(1), it's either 15,16, or 17.
y = (Var(0))         ;There's no base, the var(0) defines the y velocity completely.

[State 9001, HitDef] ;The heart of The code. It defines how the the projectile hits.*
type = HitDef        ;*Because i suppose you know the basics, I won't bother explain all.
trigger1 = 1
attr = S, NA
hitflag   = MAFDP
guardflag = MA
animtype = Hard
priority = 7, Hit
damage = 10,5
pausetime = 5,5
guard.pausetime   = 15,20
sparkno   = S6150
guard.sparkno = S6150
sparkxy   = 0,40
hitsound = S1,12
guardsound = S1,12
ground.type = High
air.type = Trip
ground.slidetime = 25
ground.hittime = 25
air.hittime   = 25
ground.velocity   = -8
guard.velocity = -8
air.velocity = -8,-3.5
airguard.velocity = -8,-3.5
ground.cornerpush.veloff = 0
fall.xvelocity = -1
fall.yvelocity = -3
fall.recover = 0
air.fall = 1
down.velocity = -1,-2
down.bounce   = 1
id = 701
getpower = 0
givepower = 25
palfx.time = 12
palfx.mul = 256,256,256
palfx.add = 200,50,10
palfx.sinadd = 175,25,5,4
envshake.time = 12
envshake.freq = 120
envshake.ampl = -4
persistent = 0

[State 9001, DestroySelf]              ;The finale. It destroys the helper in specific circumstances
type = DestroySelf
trigger1 = MoveContact             ;First condition. It destroys when the projectile hits.
trigger2 = FrontEdgeBodyDist < -30 ;Second condition. It destroys when the x distance from the nearest*
ignorehitpause = 1                       ;*vertical wall is smaller than -30 (so when the distance is -31 or smaller)

If you used this tutorial in your character, I would like to see my name in the credits list.
I hope you learned much from it!



Offline vyn

  • Contributor
  • ****
  • Posts: 953
  • Country: Mexico mx
  • Last Login:September 02, 2024, 02:31:22 AM
    • Email
Re: ynvaser's Helper Projectile Tutorial
« Reply #1 on: August 11, 2008, 08:52:54 PM »
wouldnt recomend to use the nothitby in actual characters, this is an invinsible projectile, use a hitoverride to avoid cloning problems which i guess is the point of having a nothitby, tough it only has sca, this projectile can probably be grabbed, would be funny XD

u can summarize ur random variables with random% to simplify the code

[State 9001, VelSet]
type = VelSet
trigger1 = (!Time)
x = 15+(random%3)   
y = 0+(random%5)

Offline +Genesis+

  • Tier 1 Founder
  • Initiate
  • **
  • Posts: 25
  • Country: United States us
  • Last Login:October 10, 2017, 11:50:52 PM
    • oblivion9794
    • Skype - cappuchinose
    • Tier 1
    • Email
Re: ynvaser's Helper Projectile Tutorial
« Reply #2 on: August 13, 2008, 03:32:48 PM »
this was actually helpful  :w00t:

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

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]


D2TD VS Showcase Thread by D2TD
[November 17, 2024, 08:36:39 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