YesNoOk
avatar

Limiting use of a teleport (Read 3299 times)

Started by demovv, December 03, 2017, 11:32:12 pm
Share this topic:
Limiting use of a teleport
#1  December 03, 2017, 11:32:12 pm
  • avatar
  • *
    • Poland
I want to add limit move to my teleport move but I don't know how to do that. This move can be overused so i decided to limit this move to five times or more.
Re: Limiting use of a teleport
#2  December 04, 2017, 12:15:28 am
  • ****
  • Humanity can be so much more
    • Jamaica
    • https://network.mugenguild.com/makkah/
Use a variable, and add 1 to it every time your character teleport. In the cmd use var(n) < 5 as one of the triggeralls, where n is whichever  number you decided to use.
Re: Limiting use of a teleport
#3  December 04, 2017, 04:45:36 am
  • ******
    • www.justnopoint.com/
Or create an explod every time you go into the teleport at !Time. If NumExplod(x)>=5 then no teleport changestate
Re: Limiting use of a teleport
#4  December 04, 2017, 03:24:12 pm
  • avatar
  • *
    • Poland
Re: Limiting use of a teleport
#5  December 04, 2017, 03:32:01 pm
  • avatar
  • **
  • Literally the goddamned fun police.
    • Canada
Either that, or you can make it that every third time you attempt to teleport, you explode instead and do a bit of self-damage (as well as hurting opponents if they're too close).
Re: Limiting use of a teleport
#6  December 05, 2017, 07:51:47 pm
  • *****
  • Shame on you!
    • USA
Can you show me example how to do that?

When you're not sure how to use something in Mugen, more than likely it's covered in Mugen Class. It's always ok to ask a question. But instead of waiting for an answer you can just read it immediately. It comes in super handy.

Check out this tutorial. It should have everything you need to know.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Limiting use of a teleport
#7  December 07, 2017, 04:46:58 am
  • ****
  • Humanity can be so much more
    • Jamaica
    • https://network.mugenguild.com/makkah/
Use a variable, and add 1 to it every time your character teleport.

Can you show me example how to do that?

Sorry for the late reply, I've been a little busy.

In your teleport state you'll need a varadd so:

Code:
[State 1000, Counter]
type = varadd
trigger1 = !time
v = 2
value = 1

What this controller does is add 1 to var(2) as soon as the teleport is initiated.

In your cmd for the move you should have:

Code:
[State -1, Teleport]
type = changestate
triggerall = Var(2) < 5
*insert your other triggers etc here*

So as long as var(2) is less than 5 (the number of teleports you wish to allow) the teleport will trigger.


The method JNP described is similar in principle, but the varadd would be replaced with:

Code:
[State 1000, Teleport_Count]
type = Explod
trigger1 = !time
anim = -1
postype = p1
id = 101
pos = 0,0
removetime = -1

And your cmd state would be

Code:
[State -1, Teleport]
type = changestate
triggerall = numexplod(101) < 5
*insert your other triggers etc here*