Home   Help Search Login Register  

Author Topic: string inside of foreach command  (Read 449 times)

0 Members and 1 Guest are viewing this topic.

MorMel

  • Guest
string inside of foreach command
« on: 16 Feb 2003, 20:23:07 »
This is a basic topic:

I want to have an array of units plaing a certain movement and i don't want them having individual variable names. That means i wanna use foreach command... Unfourtunately, i dont know how to put a string inside the operator so i'm creating variables that assume the text string:

FX="SitDown"
"_x switchmove FX" foreach _array

My objective is variable creation avoiding. This way i want something like this:

"_x switchmove "SitDown"" foreach _array
or this
"_x switchmove ""SitDown""" foreach _array

but they don't work! any ideas?  :-\

Thanks.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:string inside of foreach command
« Reply #1 on: 16 Feb 2003, 20:29:35 »
i dont think dat dere is sitdown anim ::)

but da

"_X switchmove ""animname""" foreach _array wil work ;)

or u can do

{_X switchmove "animname"} foreach _array

or

{_X switchmove {animname}} foreach _array

or

"_X switchmove {animname}" foreach _array

:cheers:

LCD OUT

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

MorMel

  • Guest
Re:string inside of foreach command
« Reply #2 on: 18 Feb 2003, 15:28:57 »
Of course "SitDown" doesn't exist... just an example!

Thanks! I think at least one of them will work! (remember that in OFPv1.00 "_x playmove ""anim""" foreach _array does not work... or is my cracked version?? ;D :P)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:string inside of foreach command
« Reply #3 on: 18 Feb 2003, 15:32:18 »
ver1.00 ? cracked ? :noo: :noo: :noo:

no way ny of da codes wil work all da codes dat use {}  r only 4 OFP after 1.75

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

MorMel

  • Guest
Re:string inside of foreach command
« Reply #4 on: 19 Feb 2003, 10:51:27 »
YEAH...YEAH...YEAH... I've tried and none of them work... it seems i'll have to store those strings in variables... :(