collapse

Author Topic: Ifelse trigger direction  (Read 682 times)

0 Members and 1 Guest are viewing this topic.

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Ifelse trigger direction
« on: August 14, 2008, 08:07:38 PM »
<deep breathe> yeeeeeeeaaaah, i know this will prolly not get answered (cuz how many of my questions do.....tsk tsk tsk) BUT:

ifelse can say, if its this; then it will be that-if its not, then it with be this:  ifelse(var(?)=1,5,8)


with that said,
how can i make it say: if it is this, then it will be this or that or the other in one simple line?
« Last Edit: August 14, 2008, 08:18:35 PM by shinra358 »



Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Ifelse trigger direction
« Reply #1 on: August 14, 2008, 08:36:01 PM »
ifelse+(random%#)

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #2 on: August 14, 2008, 08:51:43 PM »
but what if i dont want it to occur random? say like the char,say like, 4 attacks for one button. and he has for  ex modes. var(3)=1 would be mode one, var(3)=2 would be mode 2, etc, etc. each of that one attack is different in each mode. So if i didnt want to keep recoding the whole statedef of that one attack, how would the ifelse look if i said that:

[statedef blah]; hardpunch
statetype = blah
movetype = blah
ctrl = blah
anim = ifelse(......................?

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Ifelse trigger direction
« Reply #3 on: August 14, 2008, 09:06:11 PM »
then put IfElse(Var(#) = 1, ###, ###)

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #4 on: August 14, 2008, 09:09:22 PM »
i know that. thats what i just explained ifelse to mean in the first place. That only shows 2 redirecting. Im asking how would i set up to do 4 in just that one same line.....?

Offline Luis/Dshiznet

  • Infinity Regular
  • ****
  • Posts: 1277
  • Last Login:September 16, 2009, 04:58:10 PM
  • Aaron-sama
    • My myspace
    • Email
Re: Ifelse trigger direction
« Reply #5 on: August 14, 2008, 09:40:44 PM »
well that i dont man sorry  :-??

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #6 on: August 14, 2008, 09:44:56 PM »
well that i dont man sorry  :-??

o.O#    :'(


thanx anyway. at least i got a response this time.  :thumbsup:

but the question is up for anyone else, i still need an answer....................................................................................... @-)

Offline El Chupacabras

  • Forum Member
  • ***
  • Posts: 315
  • Last Login:June 11, 2010, 04:34:36 PM
Re: Ifelse trigger direction
« Reply #7 on: August 14, 2008, 09:51:09 PM »
Do an ifelse within an ifelse, but if you want four, then you can do and ifelse within an ifelse within an ifelse...  :(

EX -

Ifelse( var(4)=0, 5, ifelse( var(4)=1, 10, ifelse( var(4)=2, 15, 20 ) ) )

So there are four possible values: 5, 10, 15, and 20. But there might be an easier way depending on what exactly you want to do.

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #8 on: August 14, 2008, 10:08:50 PM »
ok understood. i dont think it can be easier than this lol. just what i was looking for  :thumbsup:

give me an example of a one with 3 and a one with 5. I just have trouble following the many brackets....... this would be a note in my notes that i can go by whenever i need it

Offline El Chupacabras

  • Forum Member
  • ***
  • Posts: 315
  • Last Login:June 11, 2010, 04:34:36 PM
Re: Ifelse trigger direction
« Reply #9 on: August 14, 2008, 10:13:12 PM »
5? I really think you should try another way, vars perhaps... but let's see, for 3 -

Ifelse( var(4)=0, 5, ifelse( var(4)=1, 10, 15 ) )

... for 5 -

Ifelse( var(4)=0, 5, ifelse( var(4)=1, 10, ifelse( var(4)=2, 15, ifelse( var(4)=3, 20, 25 ) ) ) )

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #10 on: August 14, 2008, 10:35:25 PM »
thnx very much!!!!! if i can trouble you for one more.......6. And that would be it. You are helping for a very great cause here......... :w00t: :w00t: :w00t:

Offline El Chupacabras

  • Forum Member
  • ***
  • Posts: 315
  • Last Login:June 11, 2010, 04:34:36 PM
Re: Ifelse trigger direction
« Reply #11 on: August 14, 2008, 10:41:17 PM »
Ifelse( var(4)=0, 5, ifelse( var(4)=1, 10, ifelse( var(4)=2, 15, ifelse( var(4)=3, 20, ifelse( var(4)=4, 25, 30 ) ) ) ) )

Offline shinra358

  • Infinity Regular
  • ****
  • Posts: 736
  • Last Login:August 16, 2008, 07:20:26 PM
Re: Ifelse trigger direction
« Reply #12 on: August 14, 2008, 10:42:50 PM »
Are you Criss Angel? lol. Thanx again for your gr8 assistance...Im the type of coder that doesnt use vars when he doesnt really have to. Makes compatibility with many add-ons (like tsmugen) much easier to completely install.
« Last Edit: August 14, 2008, 10:53:41 PM by shinra358 »

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

Neo Geo Pocket by malevka2
[June 05, 2024, 10:53:57 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[June 03, 2024, 03:18:12 PM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[June 03, 2024, 03:13:51 PM]


Mega Man & Bass - Dynamo Man by Sir Rousseau by O Ilusionista
[June 03, 2024, 03:09:50 PM]


D2TD VS Showcase Thread by D2TD
[May 31, 2024, 11:44:23 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[May 26, 2024, 07:39:11 PM]


TMNT Hong Kong Stage for 1.0 & 1.1 Re-Release by LightFlare
[May 24, 2024, 01:44:07 PM]


Captain Commando Stage Pack by Vegaz by LightFlare
[May 24, 2024, 09:20:05 AM]


Street Fighter 1 Ultimate Ryu by ELECTRO
[May 22, 2024, 03:58:25 PM]


China Town (Revenge of Shinobi) by Lord_Enemil
[May 22, 2024, 03:02:10 PM]

* IMT Calendar

June 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