'S' update as of 4/12/11

This forum is currently in read-only mode.
From the Asset Store
A post apocalyptic music pack with 12 main themes and 12 in-game loops
  • Oh. That makes sense, actually. I'll give it a try, see how it goes.

  • hey lucid.

    In your Object array actions for object position, dimension / angle super array

    can add one more parameter animation names.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Just a suggestion if you ever add anymore to S.

    How about a way to save an array within S itself?

    Something like this:

    + 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.
  • hey lucid.

    In your Object array actions for object position, dimension / angle super array

    can add one more parameter animation names.

    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

    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

    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

    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.

    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

    Just a suggestion if you ever add anymore to S.

    How about a way to save an array within S itself?

    Something like this:

    + 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.
    

    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

  • 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"})}

    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"})}

    then I can do this instead of the original way

    [quote:ymgud9jw]add objectarray "icon" to super {"p","currententry"}

    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"})}

    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"})}

    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"})}

    and your loop is called "myentries"

    anywhere you need to refer to that long address you can just use

    [quote:ymgud9jw]{"l","myentries"}

    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

  • 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.

    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

  • 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

  • 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?

  • 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

  • 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.

  • 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"....

    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?

  • Open the wizard. Instead of picking an object right-click over the bar and select "use expression" from the context menu.

  • Thank you. It's so ease (facepalm).

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