The Daily Click ::. Forums ::. Klik Coding Help ::. CSV ( comma seperated values)
 

Post Reply  Post Oekaki 
 

Posted By Message

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
19th October, 2007 at 02:01:27 -

Hey, Im developing an inventory and weapon equipment system in my game. It uses strings. To make it simpler, i use only one string seperated by commas. e.g,

1,2,Weapon Name,2,50,

where each part of the string represents something. Now, the problem here is that i cant use the string manipulator to assign different parts of the string in one event. for example, if i want to assign the third part, which is "weapon name" to some variable, i can do that. But if i want to assign "weapon name" and the part after that, i cant. ive even tried doing that with 6 different string manipulators and it still wont work.

Does anyone have any idea how it would? Also, Ive tried using string parser but I dont really know how to get CSVs from it. Any help will be most appreciated.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
19th October, 2007 at 07:52:38 -

It's quite simple really. First, you have to add "," as a delimeter, like so:

* Start of level
- String Parser: Add delimeter ","

Then, you set the source string:

* (Event)
- String Parser: Set source string to "1,2,Weapon Name,2,50,"

You probably want to use an expression there, but you get the idea. Then, you use the listGetAt$ function to get the appropriate value from the string. It's found under String Parser > List Tokenizing > Get element. So to get the weapon name (element #3) from the above string, you'd use something like:

listGetAt$( "String Parser", 3)

I hope this helps!

 
n/a

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
19th October, 2007 at 13:58:20 -

Thanks. That actually does help a lot. Is there anyway to tell multimedia fusion which alterable value (of some object) to change through it?

Nevermind, got that done

Image Edited by the Author.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!
   

Post Reply



 



Advertisement

Worth A Click