'S' update as of 4/12/11

Forum Home Forum Home > Construct Classic > Construct Classic Discussion
 Post Reply Post Reply Page  <1 910111213 14>
Author
6,619 Rep
Post Options Post Options   Quote Candescence Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jul 2010 at 3:54pm
Sorry for the double post, but I seriously believe I've found a major bug in the latest version of S. I've been trying to pick out indexes in base Supers, such as {"Party Members", 1, "Name"}, but every time I do, Construct crashes. This doesn't happen for supers inside those supers, such as {"Party Members", "Member", 1, "Name"}. It basically results in forcing the user to be redundant with their supers, when you shouldn't need to be.

Fix, plz.
Back to Top
11,241 Rep
Post Options Post Options   Quote lucid Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jul 2010 at 4:35pm
Hmmm. Ill take a look when I get home. In the meantime if you can get the debugger to give a message(the s debugger actions, not the regular construct debugger). I might be able to figure it out with those, and if it crashes before the debugger can figure out why, it'll almost guarantee it is an s problem and not a user error
Back to Top
11,241 Rep
Post Options Post Options   Quote lucid Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jul 2010 at 10:06pm
works for me cand:
[url:11o4vooy]http://dl.dropbox.com/u/1013446/superindex.cap[/url:11o4vooy]
Back to Top
6,619 Rep
Post Options Post Options   Quote Candescence Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jul 2010 at 1:32am
... What. You have to make arrays for every index of the super you want to make it actually work? That's something I wanted to avoid having to do, to be quite frank. I don't see the point of it, it's just redundant.
Back to Top
11,241 Rep
Post Options Post Options   Quote lucid Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jul 2010 at 1:58am
if what you're asking is what I think you're asking, you may be looking for templates

when you make an array of anything you can set a default for new array values
templates are the defaults for super arrays
in the example cap I didn't use a template because I wasn't sure if you knew about them
but in this case you would say

Action : Create Template
template name "coord"
add number array to {"t","coord"} "x" with default 0
add number array to {"t","coord"} "y" with default 0

the "t" as the first part of the address tells s you're adding to a special template super and not a regular super in your whole data structure
you can use these as you can any other super, adding other supers inside if you wish, etc

now when you create a super array you can do
create super array "mycoords" with default "coord"
now each time you add a super, it will already have the "x" and "y" arrays in it
you can even fill the arrays with values in the templates if you wish, so each new super will be preloaded with preset values

it may not seem immediately evident now, but there may be cases where you don't want the second super in an array to be exactly like the first, and vice versa, templates give you the ability to decide what goes in every super, without forcing you to put the same arrays in each one

a few things of note, don't add objects into the templates, because object pointers change each time the program starts, so they would be invalid, you can add object types though. when you save and load supers to disk, you have the option to save your template data too. also, unlike arrays of anything else you can't access a super array outside of range and get the default
meaning if your array has 5 supers you cant try to access index 9, and get access to the templates
it really wouldn't make any logical sense anyway. but just so you know
Back to Top
6,619 Rep
Post Options Post Options   Quote Candescence Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jul 2010 at 2:44am
Oh. That makes sense, actually. I'll give it a try, see how it goes.
Back to Top
2,047 Rep
Post Options Post Options   Quote toralord Quote  Post ReplyReply Direct Link To This Post Posted: 02 Oct 2010 at 11:05pm
hey lucid.
In your Object array actions for object position, dimension / angle super array
can add one more parameter animation names.
Back to Top
2,047 Rep
Post Options Post Options   Quote toralord Quote  Post ReplyReply Direct Link To This Post Posted: 20 Oct 2010 at 12:04pm
I found a bug.
for some reason when ever I save and/or load a .txt files that contain super array, that have objects and strings arrays info s plug expression don't read global or private variable.

look at this
+ System: Is global variable 'd' Equal to 1
+ System: Trigger once
+ System: For each Sprite
-> Sprite: Set 'number_animation' to global('set_animation')
-> System: Add 1 to global variable 'set_animation'
-> Sprite: Set animation to S.s({"master_animation","tiles",Sprite.Value('number_animation')})

if
({"master_animation","tiles",0}) = grass
({"master_animation","tiles",1}) = water
({"master_animation","tiles",2}) = lava
({"master_animation","tiles",3}) = grass

take this expression for example S.s({"master_animation","tiles",Sprite.Value('number_animation')})

if
sprite 1 Sprite.Value('number_animation') = 0 it should be grass
sprite 2 Sprite.Value('number_animation') = 1 it should be water
sprite 3 Sprite.Value('number_animation') = 2 it should be lava
sprite 4 Sprite.Value('number_animation') = 3 it should be grass

but S.s({"master_animation","tiles",Sprite.Value('number_animation')})
don't read Sprite.Value('number_animation') so it stay at 0 which is grass
Back to Top
4,366 Rep
Post Options Post Options   Quote Noga Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jan 2011 at 5:59pm
I'd like to try the plugin, are you still working on it? Should I download the alpha or wait for beta. Could you move it to the plugins section? It always takes me a while when searching for it.
Back to Top
16,863 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 2011 at 12:34am
Just a suggestion if you ever add anymore to S.
How about a way to save an array within S itself?
Something like this:

[code:25m45uj7]+ System: For "x" from 0 to 5
-> S: insert number {1,2,3,4,5}@loopindex("x") to {""} at "end"[/code:25m45uj7]

With out the need of a loop.
Back to Top
 Post Reply Post Reply Page  <1 910111213 14>

Forum Jump Forum Permissions View Drop Down