'S' update as of 4/12/11

New releases and general discussions.

Post » Sat Apr 09, 2011 12:34 am

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.
Image Image
B
161
S
48
G
90
Posts: 7,353
Reputation: 66,761

Post » Sat Apr 09, 2011 11:57 am

[quote="toralord":2vapn45h]hey lucid.
In your Object array actions for object position, dimension / angle super array
can add one more parameter animation names.[/quote:2vapn45h]
Sorry for the late response. At the moment superbusy with the animation project, but I will try to remember to go back to this thread, when I next update the plug


[quote="toralord":2vapn45h]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[/quote:2vapn45h]
Hmmm. Ill try to take a look at this, sorry the response is so late but if I'm understanding you correctly it should be some other problem going on, there's nothing I can do with th sdk to change the way it reads expressions, so it should automatically read those correctly. Ill read thi agagin later to try an interpret

[quote="Noga":2vapn45h]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.[/quote:2vapn45h]
Ill try to move it when I get home. Its fine to use now. Only broken feature is pointers, but they are not needed, just a shortcut


[quote="newt":2vapn45h]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:2vapn45h]+ System: For "x" from 0 to 5
-> S: insert number {1,2,3,4,5}@loopindex("x") to {""} at "end"[/code:2vapn45h]

With out the need of a loop.[/quote:2vapn45h]
That's definitely, possible. But yeah, at the moment focusing on the ultimate engine of doom, but when that's over remind me again and ill add that
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Apr 13, 2011 12:33 am

howdy yall. I noticed I messed up on the pointer and loop based addressing system in 's'
oops
I guess no one was really using those features since no one complained. but here's the new working version
http://dl.dropbox.com/u/1013446/New%20f ... 6%29/s.rar
they're both handy features. somewhere in these 12 pages is the explanation of what they do, but I'll do a quick reminder here for anyone interested.

The Set Pointer action lets you make a pointer
I'll use an actual example from my current project where I realized they weren't working and fixed them
I had a bunch of events that looked like this:
[quote:ymgud9jw]add objectarray "icon" to super {"window",s.sule({"window"}),"entries",s.sule({"window",s.sule({"window"}),"entries"})}[/quote:ymgud9jw]
needless to say that's very ugly, hard to read, and easy to make a mistake with, so with a pointer I could say
[quote:ymgud9jw]Set Pointer "currententry" to {"window",s.sule({"window"}),"entries",s.sule({"window",s.sule({"window"}),"entries"})}[/quote:ymgud9jw]
then I can do this instead of the original way
[quote:ymgud9jw]add objectarray "icon" to super {"p","currententry"}[/quote:ymgud9jw]
the "p" at the start of an address tells s the next part of the address is a pointer name, and it will act as if instead of "p","pointername" you typed in all that stuff that you set the pointer to
you can also use pointers in pointer addresses, which I actually did in the same example like
[quote:ymgud9jw]Set Pointer "currentwindow" to {"window",s.sule({"window"})}[/quote:ymgud9jw]
and when I needed to use something within that address over and over I did:
[quote:ymgud9jw]Set Pointer "currententry" to {"p","currentwindow"),"entries",s.sule({"window",s.sule({"window"}),"entries"})}[/quote:ymgud9jw]

you can use them as partial addresses as you see above as well, where I started the address with the pointer and the continued on to go in entries within that pointed to super

the loop address thing does the same thing
if you're in a loop(an s loop, not a system loop), say you're looping through some insane address
[quote:ymgud9jw]{"window",s.sule({"window"}),"entries",s.sule({"window",s.sule({"window"}),"entries"})}[/quote:ymgud9jw]
and your loop is called "myentries"
anywhere you need to refer to that long address you can just use
[quote:ymgud9jw]{"l","myentries"}[/quote:ymgud9jw]
and all the same rules as the pointers talked about above work, except you start with "l" for 'loop' instead of "p" for 'pointer'
it's especially useful as you being looping through an array, and then looping a loop within that one of another array within the first one, etc, etc, and you not only don't have to type in the whole address you're looping through each time you add another nesting loop, or when you need to access the size of an array or something from a very outer loop, you don't have to keep track of any of the addresses

one last thing about pointers by the way...they can kinda be used as variables, too
no special commands or anything, but for example, let's say you have two object arrays, one called "air targets", and one called "ground targets"

you can set a pointer called "current targets"
then do all your commands on that address, and not care which array it's currently pointing to

oh yeah, last last thing about pointers. it's meant to be simple, if you Set a Pointer you haven't set yet, it is created, if it has already been set, it will be overwritten with the new address
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Apr 15, 2011 1:05 pm

[quote="lucid":1sltummw]howdy yall. I noticed I messed up on the pointer and loop based addressing system in 's'
oops
I guess no one was really using those features since no one complained.[/quote:1sltummw]
So now I wonder what exactly was wrong with pointers? I mean, I use them for about a year now and didn't have any problem whatsoever :?:
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Fri Apr 15, 2011 1:55 pm

The problem only arose if you were pointing to the highest indexed location of something

So, to have the problem, you would have to be pointing to an address with at least one numerical index in it that was the highest index for that array. If you did this, it would 'think' it was out of range and read the index as 0

Like if the array "stackofstuff" had had 5 things in it
({"stackofstuff",4}), would be the last thing in it. If you pointed a pointer to that it would would be like putting {("stackofstuff"})

In any other situation, including numerical indexes less than the highest in the array, it should have worked
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Thu May 05, 2011 2:05 pm

I am having trouble adding something to the level editor example that is posted earlier in this thread. What i was doing was add in the MagiCam object to follow a hidden sprite and scroll the area so you place more parts in a simple way.

The problem with this was the graphics you drag and drop would scroll around also so simply made a new layer with no scroll amounts with the graphics you drag and drop. That then worked however a new problem then happens in that the new graphics are placed on the wrong layer and act like the GUI part.

I have tried to do things like change the actions layer values and workaround but with no luck and if i do for each events for the blue group to place to a layer then the GUI also gets placed to the first layer. It's possibly a bug also but i don't know.

Does anyone know how to add a scrolling system (MagiCam object if possible) to this level editor?
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

Post » Thu May 05, 2011 9:33 pm

it'll be easier to answer if you post a cap file. if you'd prefer not to post it for some reason, you can pm it to me
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri May 06, 2011 12:02 pm

The cap i was trying to modify is called lvleditortut.cap and you posted it on page 5 in this thread. Sadly i didn't keep the changes i had made though as i failed to get it working correctly.

I couldn't get the icons/gui on the left of the screen to ignore the MagiCam scrolling without making a new layer, which is what i then did. The new layer made the gui work but then caused the drag and drop part to break as it put new items on the wrong layers. So in the end i had the result i wanted for the gui but had broken the drag ad drop which was the most important part. :(

The main thing i was aiming for was to simply have that editor with screen scrolling so you can make larger game areas.
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

Post » Sun Jun 12, 2011 12:08 pm

[quote="lucid":1ph1yy4m]
we create a new object of type .tt("blue") that is the true type of the picked "blue", and we create this new object at the same location as the picked "blue"....
[/quote:1ph1yy4m]

Excuse me, but in action "System -> Create object" impossible to use expressions (this action allows to pick an object, but not to use expressions). Teach me please, how you have made it?
B
3
G
1
Posts: 3
Reputation: 535

Post » Sun Jun 12, 2011 12:58 pm

Open the wizard. Instead of picking an object right-click over the bar and select "use expression" from the context menu.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests