collapse

Author Topic: Velset/Varset Issue  (Read 474 times)

0 Members and 1 Guest are viewing this topic.

Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Velset/Varset Issue
« on: December 17, 2012, 06:01:13 PM »
Not sure how to explain this...but i'm sure there's a simple answer to this which i cant figure out.  I see people like Pots and Rajaa code there projectiles attacks in this way.

I'm using Rajaa's method for this, though my character only has 4 buttons.  I'm wondering how to make this work for a 4 button character.  I did remove the 2 but couldn't figure out how to end it.

[state 1000, Varset]
type = varset
trigger1 = !time
var(10) = ifelse(command="QCF_x",0,ifelse(command="QCF_y",1,2))

[state 1090,Velset]
type = velset
trigger1 = !time
x = (3.5*(var(10)=0))+(6.5*(var(10)=1))
y = 0

If you didn't understand anything just ask.




A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Velset/Varset Issue
« Reply #1 on: December 17, 2012, 11:52:36 PM »
Change the ifelse statement

var(10) = ifelse(command = "QCF_x", 0,1)

That's it. You only need the 0 and 1 values. Without the 2 part of the equation nothing will happen in the velset. For the hell of it, let's assume you have used QCF+y and we apply it to the velset
(3.5*(var(10)=0))+(6.5*(var(10)=1))
Becomes
(3.5*(0))+(6.5*(1))
Becomes
(0)+(6.5)
Becomes
6.5
If it was set to 0, the 6.5 would multply by 0, and you would get a vel of 3.5. Anyway, alter the ifelse in the varset and you'll get the result you want.

Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Re: Velset/Varset Issue
« Reply #2 on: December 18, 2012, 10:10:08 AM »
Thanks Cyanide, I'll try it out later.
A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Jesuszilla

  • MUGEN Content Architect
  • *****
  • Posts: 40
  • Country: United States us
  • Last Login:January 08, 2015, 08:57:19 PM
  • I'm a fuffy.
    • Trinity MUGEN
Re: Velset/Varset Issue
« Reply #3 on: December 20, 2012, 03:40:31 PM »
That velSet can be simplified to:

[state 1090,Velset]
type = velset
trigger1 = !time
x = 3.5*(3*var(10))

or

[state 1090,Velset]
type = velset
trigger1 = !time
x = ifElse(Var(10),6.5,3.5)


Also, since you're coding a projectile, I beg you not to use Phantom.of.the.Server's projectile code. It's flawed and it requires a lot of stupid workarounds in order to properly interact with them.

You can do this by having the hitdef interact ONLY with the opponent (hitflag = MAF), and then using a projectile SCTRL to cancel out other projectiles. You can look at Vans's Robert to see what I mean here.

There is no template. Warusaki3 built on top of a similar character, just like Vans and I do.

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

Classic VS : Athena by ELECTRO
[May 10, 2024, 02:44:09 PM]


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


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


D2TD VS Showcase Thread by D2TD
[May 05, 2024, 10:08:50 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* 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