Arrays and Collision Woes

0 favourites
  • 3 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • So in my game I'm planning on having a bunch of different weapons that share different statistics, speed, inaccuracy, and so-forth. Because of collision slowdown problems I had I've been forced to make one weapon object for every team (kind of bad because I'd like to have an arbitrary number of teams but it works for now). But to set the proper bullet properties/behaviors for this object each time I create it I need some way to store stats in an array.

    But there's no way to set an array's values easily! You can't do it in the layout and the only way to do it in the event editor is with a million set XY actions that aren't the most readable things! There are external data storage options from XML/webstorage/ajax or JSON (for development) but honestly they seem unnecessarily complicated for what I want to do: have a data set of reference values that never changes that I can easily access in the editor. It feels like it defeats the purposes of a .capx if I have to have another file somewhere on a server just so that I can make editing my array, something that's just a list of lists of numbers, easy.

    Is there really no other solution?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You might want to try your luck with a CSV and string tokenization. Edit your CSV with a spreadsheet app then paste the text in a global variable or what not. Although I'm not sure of what is the characters limit of a variable, it's probably more than enough for your needs ! (unless you were serious with your "million" <img src="smileys/smiley11.gif" border="0" align="middle" />)

  • Haha no that million was a bit of hyperbole. But what's a CSV? Are you talking about the plug-in by rex (http://www.scirra.com/forum/plugin-csv-csv2array_topic46096_page1.html)? I don't recall reading anything about csv in the manual.

    edit:

    After tootling around quite a bit, I'm going to use the CSV->array converter provided by Rex to set up my arrays by making CSVs with a spreadsheet, copying the string into Construct and then importing them (or copying the string to text and opening with my spreadsheet program to edit them. It's probably possible to do a similar thing sans-plug-in but with the plug-in there I'll use it for convenience as I haven't found any compatibility problems.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)